18 lines
596 B
Bash
Executable File
18 lines
596 B
Bash
Executable File
#!/bin/bash
|
|
|
|
if [[ "$(sonic-cfggen -d -v BGP_DEVICE_GLOBAL.STATE.tsa_enabled)" == "false" ]]; then
|
|
echo "System is already in Normal mode"
|
|
logger -t TSB -p user.info "System is already in Normal mode"
|
|
else
|
|
# toggle the mux to auto if dualtor
|
|
if [[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]];
|
|
then
|
|
logger -t TSB -p user.info "Toggle all mux mode to auto"
|
|
sudo config mux mode auto all
|
|
fi
|
|
|
|
/usr/bin/TS TSB
|
|
echo "Please execute 'config save' to preserve System mode in Normal state after reboot or config reload"
|
|
fi
|
|
|