2019-07-26 16:31:56 -05:00
|
|
|
#!/bin/bash
|
|
|
|
|
2021-02-12 12:56:44 -06:00
|
|
|
# Load the common functions
|
|
|
|
source /usr/bin/TS
|
2019-07-26 16:31:56 -05:00
|
|
|
|
2021-04-08 17:16:43 -05:00
|
|
|
find_num_routemap
|
|
|
|
routemap_count=$?
|
2020-04-23 11:42:22 -05:00
|
|
|
check_not_installed
|
|
|
|
not_installed=$?
|
|
|
|
|
|
|
|
check_installed
|
|
|
|
installed=$?
|
|
|
|
|
2021-04-08 17:16:43 -05:00
|
|
|
if [[ $routemap_count -eq 0 ]];
|
|
|
|
then
|
|
|
|
echo "System Mode: No external neighbors"
|
|
|
|
elif [[ $installed -eq 0 ]];
|
2019-07-26 16:31:56 -05:00
|
|
|
then
|
|
|
|
echo "System Mode: Normal"
|
2020-04-23 11:42:22 -05:00
|
|
|
elif [[ $not_installed -eq 0 ]];
|
2019-07-26 16:31:56 -05:00
|
|
|
then
|
|
|
|
echo "System Mode: Maintenance"
|
|
|
|
else
|
|
|
|
echo "System Mode: Not consistent"
|
|
|
|
fi
|