b4517b9591
* [bgp]: Implement Universal Traffic Shift for SONiC * Fix issue with ipv6 loopback match * Add tests
25 lines
751 B
Bash
Executable File
25 lines
751 B
Bash
Executable File
#!/bin/bash
|
|
|
|
c=0
|
|
config=$(vtysh -c "show run")
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V4 permit 2"
|
|
c=$(($c+$?))
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V4 deny 3"
|
|
c=$(($c+$?))
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V6 permit 2"
|
|
c=$(($c+$?))
|
|
echo "$config" | grep -q "route-map TO_BGP_PEER_V6 deny 3"
|
|
c=$(($c+$?))
|
|
|
|
if [[ $c -eq 0 ]];
|
|
then
|
|
vtysh -c "configure terminal" -c "no route-map TO_BGP_PEER_V4 deny 3"
|
|
vtysh -c "configure terminal" -c "no route-map TO_BGP_PEER_V4 permit 2"
|
|
vtysh -c "configure terminal" -c "no route-map TO_BGP_PEER_V6 deny 3"
|
|
vtysh -c "configure terminal" -c "no route-map TO_BGP_PEER_V6 permit 2"
|
|
|
|
echo "System Mode: Maintenance -> Normal"
|
|
else
|
|
echo "System is already in Normal mode"
|
|
fi
|