Intel MPCMM0001 Network Card User Manual


 
212 MPCMM0001 Chassis Management Module Software Technical Product Specification
Updating CMM Software
23.13.2 Data Restore User Scripts
The update process will also execute user scripts following the update of the new /etc file system to
flash. The update process will execute any user scripts that match the following pattern: /home/
update/scripts/S*. Arguments will be passed that the scripts can use. These arguments are:
arg1 = Update Component Name: ["BlueCat", "etc_jffs", "RedBoot", "fpga"]
Note: For the user scripts, this argument will always be "etc_jffs".
arg2 = Update Direction: ["forward", "backward", "same"]
Note: "forward" means that the Update Package version is newer than the installed version. "same"
means they are the same, and "backward" means the Update Package version is older then the
installed version.
arg3 = Installed Package Version: i.e, "5.1.0.0117". This is the version of the software that is
installed on the cmm.
arg4 = Update Package Version: i.e., "5.1.0.0117". This is the version of the update package
software.
The update script will print a message to the terminal indicating whether the script was successful
or failed. The failure of one of these scripts does not cause the overall update process to fail.
These scripts can be used to perform any user updates that need to coincide with the newly
installed version.
Note: In prior versions of this document, the following examples showed how to use the user scripts to
replace a script in the /etc/scripts directory. Going forward, all user scripts should be stored in
/home/scripts. The directory /etc/scripts will be a link to /home/scripts. As a general rule, users
should only put scripts and files under the /home directory.
23.13.3 Example Task—Replace /home/scripts/myScript
The following example update scenario demonstrates replacing /home/scripts/myScript with a
newer version (if updating “forward”) or an older version (if updating “backward”).
There are three CMM builds - call them A, B, and C. The CMM is currently installed with
build B. Build A is older than B and C is newer.
If the CMM is updated to build C, then the user script /home/scripts/myScript needs to be
updated to a newer version.
Similarly, if the CMM is reverted to build A, then the user script /home/scripts/myScript needs
to be replaced with an older version.
The old version of myScript is placed on the CMM as: /home/stagingarea/myScript.old
The new version of myScript is placed on the CMM as: /home/stagingarea/myScript.new
The Data Restore User Script written to manage /home/scripts/myScript is placed on the CMM
as: /home/update/scripts/S10updateMyScript
A simple example of the S10updateMyScript could look like the following:
#!/bin/bash