sonic-buildimage/dockers/docker-fpm-frr/base_image_files/TSA

14 lines
460 B
Plaintext
Raw Normal View History

#!/bin/bash
# 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
fi
/usr/bin/TS TSA
echo "Please execute 'config save' to preserve System mode in Maintenance after reboot or config reload"