Intel MPCMM0001 Network Card User Manual


 
MPCMM0001 Chassis Management Module Software Technical Product Specification 213
Updating CMM Software
direction=$2
if [ "$direction" = "forward" ] ; then
cp /home/stagingarea/myScript.new /home/scripts/myScript
elif [ "$direction" = "backward" ] ; then
cp /home/stagingarea/myScript.old /home/scripts/myScript
fi
exit $?
When the update process executes, and the Data Restore User Scripts are executed (during the
update of the /etc partition), then the script S10updateMyScript will be executed and /home/script/
myScript will be updated accordingly.
Variation on the above example:
In this case, the different versions of myScript are put on the CMM (by the user) as:
/home/stagingarea/myScript.A
/home/stagingarea/myScript.B
/home/stagingarea/myScript.C
Note: If the CMM has build A installed, the "cmmget -d version" command will return the string "A" -
and so on for builds B and C.
Another example of S10updateMyScript :
#!/bin/bash
newversion=$4
cp /home/stagingarea/myScript.$newversion /home/scripts/myScript
exit $?
23.14 Update Process
1. Client initiates an update request via CLI command
2. CMM validates the update request
CMM is not already doing an update
Enough space is present in ramdisk and flash for the update
3. If update request is valid then
Continue
4. Else
—Exit
5. If FTP arguments supplied then
Retrieve package files (.zip, .md5) from FTP server
Exit if error occurs
6. Else
Copy package files (.zip, .md5) to package directory on ramdisk (/usr/local/cmm/temp/
update/package)