NSHScriptParam - createNSHScriptParameter
NSHScriptParam - createNSHScriptParameter
Description :
This command creates a parameter to be used in an NSH script. You set the default value of this parameter by setting the value argument. The valueFlag argument is a single integer that is sets the following properties on the value argument:
- 1 = parameter accepts value
- 2 = value must not be empty at runtime
- 4 = value is editable
8 = flag is required at run time
The valueFlag integers are additive, similar to UNIX permissions. For example, a valueFlag of 5 sets the parameter value to be non-empty and be editable. This command returns the NSHScriptParam object for use by the NSHScript addNSHParam command.Return type : java.lang.Object
Command Input :
Variable Name | Variable Type | Description |
|---|---|---|
name | String | Name of the NSH script parameter. |
description | String | Description of the NSH script parameter. |
value | String | Value of the NSH script parameter. |
valueFlag | Integer | Setting that modifies the behavior of the parameter, see above. |
Example
The following example creates an NSH Script parameter based on the same examples used in the NSHScript name space, using a reboot script.
Script
PAR_NAME=delaytime
PAR_DESC="The time in seconds before reboot"
PAR_VALUE=""
PAR_FLAG=0
RESULT=`blcli NSHScriptParam createNSHScriptParameter $PAR_NAME "$PAR_DESC" "$PAR_VALUE" $PAR_FLAG`