Chapter 15: Advanced Configuration

sleep 30s

fi

if [ "$COUNTER" -eq 5 ] then

COUNTER=0 "$@" sleep 2s

fi

done



 !      

A configurator is responsible for reading the values in /etc/config/config.xml and making the appropriate changes live. Some changes made by the configurators are part of the Linux configuration itself, such as user passwords or ipconfig.

Currently there are nineteen configurators. Each one is responsible for a specific group of config (for example, the "users" configurator makes the user configurations in the config.xml file live). To see all the available configurators, type the following from a command line prompt:

# config

When a change is made using the Management Console web GUI, the appropriate configurator automatically runs. This can be a problem if another Administrator makes a change using the Management Console. The configurator could possibly overwrite any custom CLI/linux configurations you may have set.

The solution is to create a custom script that runs after each configurator runs. After each configurator runs, it will check whether that appropriate custom script exists. You can then add any commands to the custom script and they will be invoked after the configurator runs.

The custom scripts must be in the correct location:

/etc/config/scripts/config-post-

To create an alerts custom script:

#cd /etc/config/scripts

#touch config-post-alerts

#vi config-post-alerts

You could use this script to recover a specific backup config or overwrite a config or make copies of config files, etc.

 "       

The /etc/scripts/backup-usbscript is written to save and load custom configuration using a USB flash disk. Before saving configuration locally, you must prepare the USB storage device for use. To do this, disconnect all USB storage devices except for the storage device you want to use.

Usage: /etc/scripts/backup-usb COMMAND [FILE]

COMMAND:

check-magic -- check volume label set-magic -- set volume label

save [FILE] -- save configuration to USB

delete [FILE] -- delete a configuration tarbal from USB list -- list available config backups on USB

load [FILE] -- load a specific config from USB load-default -- load the default configuration set-default [FILE] -- set which file becomes the default

The first thing to do is to check if the USB disk has a label:

# /etc/scripts/backup-usb check-magic

If this command returns "Magic volume not found", then run the following command:

# /etc/scripts/backup-usb set-magic

724-746-5500 blackbox.com

141

Page 141
Image 141
Black Box Secure Device Servers, 1102, 1101 manual Sleep 30s If $COUNTER -eq 5 then, # config, Etc/config/scripts/config-post