EM316LNXNM-OT
Management Basics
PN 1275005-100 Rev E6
39
5.5.20.2. Executing Scripts (
source
)
Use the "
ls
" command to verify that the script is loaded in the LNXNM. Type "
source script.txt
"
to execute the CLI commands in the named script file.
Example
script.txt
:
port 1.1.1
description port 1
Loading and running
script.txt
:
fiberdriver# tftp get script.txt
Fetching script.txt from 10.1.1.19...
Copying...
fiberdriver# show 1.1.1
Port: 1.1.1
Name: RS232 at 1.1.1
Enable: enable
Connector: cu Db9
fiberdriver# source script.txt
fiberdriver# show 1.1.1
Port: 1.1.1
Name: port 1
Enable: enable
Connector: cu Db9
fiberdriver#
5.5.20.3. Restoring a Saved Configuration
Beginning with EM316LNXNM-OT v4.5, the "
source
" command does not process script command
lines that reset default values. Previous versions simply processed each script line sequentially. Contact
customer support if scripts behave differently after upgrading EM316LNXNM-OT versions.
To return a module configuration to a specific saved state, follow the steps below.
Save Configuration
1. Use the "
write file
" command to save the module configuration
2. Note the module hardware settings (necessary for most recent Fiber Driver products)
Restore Configuration
1. Set module hardware to the setting when the configuration was saved (recent Fiber Driver modules)
2. Use the "
default all
" command to configure default settings (hardware-dependent in recent Fiber
Driver modules)
3. Use the "
sync
" command to wait for all defaults to reset
4. Use the "
source [config-file]
" command to restore the non-default system configuration