1.0

Table Of Contents
CHAPTER 14 Understanding Policies
257
#
# Input to script:
# Script examines the environment variable VMWARE_NQ_DESCRIPTOR
#
# Returns:
# Returns 0 for success
#
# Expected output:
# The script may output to stdout:
# 'YES' - the descriptor is valid and up-to-date
# 'NO' - the descriptor is valid and not up-to-date
# 'REJECT' - the descriptor is not valid
#
# Setting the NQ descriptor:
# To set the NQ descriptor from the guest os you must run the
# following command:
#
# On a Linux guest:
# (Binary located at /src/sbin)
# vmware-guestd --cmd "nq-set [new descriptor]"
#
# On a Windows guest:
# (Binary located at C:\Program Files\VMware\VMware Tools)
# vmwareservice -cmd "nq-set [new descriptor]"
#
# (without the brackets around the new descriptor)
#
my @approved = (
"os=winxp-sp2,ie=6.0,virusdefs=4.0,office=2003-sp1",
"uptodate"
);
my @unapproved = (
"os=winxp-sp1,ie=6.0,virusdefs=4.0,office=2003-sp1",
"notuptodate"
);
sub find_match{
foreach (@approved) {
if (/^$_[0]$/i) {
return "YES";
}
}
foreach (@unapproved) {