From 8fb677027dc48d034fa9440b125c6bae084266d4 Mon Sep 17 00:00:00 2001 From: Remi Bergsma Date: Wed, 16 Dec 2015 14:45:57 +0100 Subject: [PATCH] make both check lines consistent No need to make a variable, use it on one place and hardcode it on another. --- systemvm/patches/debian/config/opt/cloud/bin/checkrouter.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/systemvm/patches/debian/config/opt/cloud/bin/checkrouter.sh b/systemvm/patches/debian/config/opt/cloud/bin/checkrouter.sh index f867a4846c7..0a9041bfbd1 100755 --- a/systemvm/patches/debian/config/opt/cloud/bin/checkrouter.sh +++ b/systemvm/patches/debian/config/opt/cloud/bin/checkrouter.sh @@ -17,14 +17,13 @@ # under the License. STATUS=UNKNOWN -INTERFACE=eth1 ROUTER_TYPE=$(cat /etc/cloudstack/cmdline.json | grep type | awk '{print $2;}' | sed -e 's/[,\"]//g') if [ "$ROUTER_TYPE" = "router" ] then ROUTER_STATE=$(ip addr | grep eth0 | grep inet | wc -l | xargs bash -c 'if [ $0 == 2 ]; then echo "MASTER"; else echo "BACKUP"; fi') STATUS=$ROUTER_STATE else - ROUTER_STATE=$(ip addr | grep $INTERFACE | grep state | awk '{print $9;}') + ROUTER_STATE=$(ip addr | grep eth1 | grep state | awk '{print $9;}') if [ "$ROUTER_STATE" = "UP" ] then STATUS=MASTER