Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions systemvm/debian/opt/cloud/bin/checkrouter.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ fi
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')
ROUTER_STATE=$(ip addr show dev 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 eth1 | grep state | awk '{print $9;}')
ROUTER_STATE=$(ip addr show dev eth1 | grep state | awk '{print $9;}')
if [ "$ROUTER_STATE" = "UP" ]
then
STATUS=MASTER
Expand Down