Tripp Lite B093-004-2E4U-V 4-Port Console Server with 4G LTE Cellular Gateway, Dual GbE NIC, 4Gb Flash and Dual SIM

Owner's Manual - Page 235

For B093-004-2E4U-V. Also, The document are for others Tripp Lite models: B093-00X-2E4U-X, B097-016/048, B098-016/048, B098-016-V

PDF File Manual, 285 pages, Read Online | Download pdf file

B093-004-2E4U-V photo
Loading ...
Loading ...
Loading ...
235
15. Advanced Configuration
# Make backup copy of config file
cp /etc/config/config.xml /etc/config/config.bak
echo “backup of /etc/config/config.xml saved in /etc/config/config.bak”
if [ -z $NUMBER ] # test whether a singular node is being \
#deleted e.g. config.sdt.hosts
then
echo “deleting $1”
config -d “$1”
echo Done
exit 0
elif [ $NUMBER = $TOTAL ] # Test if only one item exists
then
echo “only one item exists”
# Deleting node
echo “Deleting $1”
config -d “$1”
# Modifying item total.
config -s “$TOTALNODE=0”
echo Done
exit 0
elif [ $NUMBER -lt $TOTAL ] # more than one item exists
then
# Modify the users list so user numbers are sequential
# by shifting the users into the gap one at a time...
echo “Deleting $1”
LASTFIELDTEXT=`echo $LASTFIELD | sed ‘s/[0-9]//g’`
CHECKTOTAL=`config -g $ROOTNODE.$LASTFIELDTEXT$TOTAL`
if [ -z “$CHECKTOTAL” ]
then
echo “WARNING: “$TOTALNODE” greater than number of items”
COUNTER=1
while [ $COUNTER != $((TOTAL-NUMBER+1)) ]
do
config -g $ROOTNODE.$LASTFIELDTEXT$((NUMBER+COUNTER)) \
| while read LINE
do
config -s \
“`echo “$LINE” | sed -e “s/$LASTFIELDTEXT$((NUMBER+ \
COUNTER))/$LASTFIELDTEXT$((NUMBER+COUNTER-1))/” \
-e ‘s / /=/’`”
done
let COUNTER++
done
# deleting last user
config -d $ROOTNODE.$LASTFIELDTEXT$TOTAL
Loading ...
Loading ...
Loading ...