2019-07-26 16:31:56 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2022-07-31 00:16:58 -05:00
|
|
|
# toggle the mux to standby if dualtor and any mux active
|
|
|
|
if
|
|
|
|
[[ "$(sonic-cfggen -d -v DEVICE_METADATA.localhost.subtype | tr [:upper:] [:lower:])" == *"dualtor"* ]] &&
|
|
|
|
[[ $(show mux status | grep active | wc -l) > 0 ]];
|
|
|
|
then
|
|
|
|
logger -t TSA -p user.info "Toggle all mux mode to standby"
|
|
|
|
sudo config mux mode standby all
|
2022-01-24 20:50:29 -06:00
|
|
|
fi
|
|
|
|
|
2022-07-31 00:16:58 -05:00
|
|
|
/usr/bin/TS TSA
|
|
|
|
echo "Please execute 'config save' to preserve System mode in Maintenance after reboot or config reload"
|