Skip to content

Commit f6acda0

Browse files
Edison SuEdison Su
authored andcommitted
bug 11663: iterate the whole /var/cache/cloud/cmdline to find out the mgt server ip address, as the position is different for each hypervisor
status 11663: resolved fixed
1 parent a51fb22 commit f6acda0

1 file changed

Lines changed: 10 additions & 1 deletion

File tree

‎console-proxy/scripts/ssvm-check.sh‎

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,16 @@
2626

2727

2828
CMDLINE=/var/cache/cloud/cmdline
29+
for i in `cat $CMDLINE`
30+
do
31+
key=`echo $i | cut -d= -f1`
32+
value=`echo $i | cut -d= -f2`
33+
case $key in
34+
host)
35+
MGMTSERVER=$value
36+
;;
37+
esac
38+
done
2939

3040

3141
# ping dns server
@@ -100,7 +110,6 @@ fi
100110

101111
# check for connectivity to the management server
102112
echo ================================================
103-
MGMTSERVER=`awk '{print $12}' $CMDLINE | awk -F= '{print $2}'`
104113
echo Management server is $MGMTSERVER. Checking connectivity.
105114
socatout=$(echo | socat - TCP:$MGMTSERVER:8250,connect-timeout=3 2>&1)
106115
if [ $? -eq 0 ]

0 commit comments

Comments
 (0)