Using the HP DTC Manager/UX

132
Script examples
10
Script examples
To enable port 3 of mydtc1 (a DTC 16TN):
dtcmodifyconfs -m -e 'enable port = "x";' mydtc1 b 3
To change the DTC user interface timeout to 30 seconds on mydtc1:
dtcmodifyconfs -m -e 'DTC User Interface Timeout = "30";'
mydtc1
An example script file called dtcscript contains the following parameters:
User Interface Timeout = "9";
User Prompt = "New_DTC>";
Welcome Message = "Welcome! Type ? to get help on using the
DTC Terminal User Commands”;
This command will make all the changes listed in the script file.
dtcmodifyconfs -m -fdtcscript mydtc1
The parameters in the example are explained as follows:
-m uses the modify option.
-f uses a file containing a script. The file name is dtcscript.
mydtc1 is the name of the DTC to modify.
Key points about scripts
A script can only contain global or port parameters. You cannot mix global and
port parameters in the same script.
When the CPU/LAN or LAN is specified as the
dtcobject
parameter, only the
CPU/LAN or LAN parameters can be modified. Therefore, you cannot specify
DTC port parameters in the
script
or
scriptfile
parameter. Likewise, the
reverse is also true. If you specified a port in the
dtcobject
parameter, then only
port parameters can be modified.
The
parameter_name
is case sensitive and must be specified exactly as shown
above.