The savestat utility enables you to store and retrieve up to 20 values to persistent storage. The utility is designed to identify where you left off in an installation script even when a system reboot is required. This utility is designed to return values that set the ? environment variable so that you can branch in a script (.sh) file based on the result of the utility's execution.
SAVESTAT [/q] -set1=value [...-set2=value ... -set21=value] SAVESTAT [/q] -getn SAVESTAT [/q] -validate SAVESTAT [/q] -signature
Parameter | Description | Usage |
---|---|---|
-setn=value |
Saves an integer value, value, to the nth
location in persistent-storage memory, where n is an integer
from 1-21. Return codes:
|
./savestat.sh -setn=value Where:
|
-getn |
Retrieves a value currently set in the nth
location in persistent-storage memory. Return codes:
|
./savestat.sh -getn Where n is the location of a previously-stored value. |
-signature |
Verifies that the persistent storage contains the savestat signature. Return
codes:
|
./savestat.sh -signature |
-validate |
Verifies that the system is supported by savestat. Return
codes:
|
./savestat.sh -validate |
-q |
Invokes the quiet mode, which suppresses prompts. This parameter is optional and can be used with any other savestat parameter. | ./savestat.sh -q -set1=100 |
savestat.sh --set1=0 --set2=0 --set3=0 --set4=0 --set5=0 --set6=0 --set7=0 --set8=0 --set9=0 --set10=0 --set11=0 --set12=0 --set13=0 --set14=0 --set15=0 --set16=0 --set17=0 --set18=0 --set19=0 --set20=0 --set21=0
Example | Description |
---|---|
./savestat.sh -set2=100 |
Stores the value 100 in the second persistent-storage memory location. |
./savestat.sh -get2 if [ $? eq 100 ]; then echo The value 100 was found successfully. else echo The value 100 was not found. fi |
Retrieves the value of the second persistent-storage memory location and branches in the script file according to the value returned. |