Cisco Systems 4.1 Dust Collector User Manual


 
12-93
User Guide for Resource Manager Essentials 4.1
OL-11714-01
Chapter 12 Managing Software Images Using Software Management
Understanding User-supplied Scripts
/var/adm/CSCOpx/files/scripts/swim
On Windows:
NMSROOT/files/scripts/swim
User script timeout
Software Management waits for the time specified before concluding that the script has failed.
Software Management verifies that:
The script has write and execute permissions for the user casuser.
Only users logged in as Administrator, root, or casuser have write and execute permissions.
Caution The script should not write output to the system console. The script can write the output to a file. Writing
the script output to the system console can cause the Software Management job to hang.
Script Parameters
Software Management passes a parameter indicating whether the script is running before or after the
upgrade. If the script does not intend to perform any pre-upgrade check, the script can return an exit
value of zero and perform checks in the post-upgrade. See the
Sample Script for reference.
The parameters provided to the script by Software Management are in the form of environment variables.
The server environment variables such as PATH, SystemRoot, etc., are not passed on to the script by
Software Management. You have to set the relevant environment variables within the script. See the
Sample Script for reference.
See Adding Devices to the Device and Credential Repository section in the Common Services User
Guide and Online Help for further information on device hostname, device name (device display name),
SNMP v2 community strings, etc.
The different parameters are described in the table below:
Variable Description
CRM_SCRIPT_CONTEXT This variable is used to determine if the script has to be invoked before or
after image upgrade. If you set the variable to,
PRE-DOWNLOAD—Script is invoked by Software Management prior
to image upgrade.
POST-DOWNLOAD—Script is invoked by Software Management
post image upgrade.
NMSROOT CiscoWorks installed directory.
TMPDIR Directory provided to CiscoWorks to create temporary files.
CRM_DEV_NAME Name of Device Display name as entered in Device and Credential
Repository.
CRM_SNMP_V2_RWCOMMUNITY SNMP version 2 read-write community string.
CRM_SNMP_V2_ROCOMMUNITY SNMP version 2 read only community string.
CRM_SNMP_V3_ENGINE_ID SNMP version 3 Engine ID
CRM_SNMP_V3_USER_ID User ID configured for SNMP version 3 protocol access on the device.
CRM_SNMP_V3_PASSWORD SNMP version 3 password for the user ID.