VMware Workstation 7 Manual de usuario Pagina 395

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 512
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 394
VMware, Inc. 395
Chapter 19 Setting and Using Policies and Customizing VMware Player
#
# This script assumes that the username is defined in the environment
# variable TEST_USERNAME (a ficticious environment variable used for this
# sample) and returns TRUE if the user is allowed to run, and FALSE
# otherwise.
#
# Input to script:
# None.
#
# Returns:
# TRUE if username is on white list.
# FALSE if username is not on white list or is undefined.
#
# Expected output:
# One of the strings "TRUE" or "FALSE"
#
my @white_list = ("alan", "bob", "mary", "sonia", "chris");
my $username = $ENV{TEST_USERNAME};
if (! defined $username) {
print "FALSE";
exit(0);
}
my @grepNames = grep(/$username/, @white_list);
if (@grepNames == 1) {
print "TRUE";
exit(0);
}
print "FALSE";
exit(0);
Scriptscanbeinanylanguage.Forexample,youcanusea.batfileonWindows
operatingsystemsorperlorshonLinuxoperatingsystems.Ascriptprovides
WorkstationwithacommandlineexecutablefileorascriptfileintheACE Resources
directory.Theguidelinesascriptmustfollowdependonwhichpolicythesc
riptis
i
mplementing.
Thescriptmustexitwitha0(zero)valuetobeconsideredasuccess.Anyotheroutput
resultsinfailure.Uponsuccess,thestdoutoutputofthescriptisexamined.Foragiven
policy,thisshouldbeaspecificvaluesuchasTRUEorF
ALSE.Forapow
eronscript,
outputshouldbeTRUEorFALSE.Theauthenticationscriptoutputisusedasa
password.Thehosttoguestdatascriptisastringinaparticularformatsuchas
guestinfo.var1="value1"\nguestinof.var2="value2".
Vista de pagina 394
1 2 ... 390 391 392 393 394 395 396 397 398 399 400 ... 511 512

Comentarios a estos manuales

Sin comentarios