NSHScriptParam - createNSHScriptParameter_1
NSHScriptParam - createNSHScriptParameter
Description :
This command creates a parameter to be used in an NSH script. This parameter includes a command argument with a default value for that command argument.
You set the default value of the command argument 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. |
commandArg | String | Command argument to be set. |
value | String | Value for the command argument |
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"
COMMAND_ARG=f
PAR_VALUE=""
PAR_FLAG=0
RESULT=`blcli NSHScriptParam createNSHScriptParameter $PAR_NAME "$PAR_DESC" $COMMAND_ARG "$PAR_VALUE" $PAR_FLAG`