We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b509e08 commit b7988a3Copy full SHA for b7988a3
1 file changed
systemvm/debian/opt/cloud/bin/checkrouter.sh
@@ -27,10 +27,10 @@ fi
27
ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g')
28
if [ "$ROUTER_TYPE" = "router" ]
29
then
30
- ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi')
+ ROUTER_STATE=$(ip addr show dev eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi')
31
STATUS=$ROUTER_STATE
32
else
33
- ROUTER_STATE=$(ip addr | grep eth1 | grep state | awk '{print $9;}')
+ ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}')
34
if [ "$ROUTER_STATE" = "UP" ]
35
36
STATUS=MASTER
0 commit comments