2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-21 05:25:32 +00:00

Merge pull request #1315 from daniceexi/confignics_s

issue 1304: fix the issue confignics -s cannot get the correct netmas…
This commit is contained in:
yangsong
2016-06-16 04:02:56 -05:00
committed by GitHub

View File

@ -428,7 +428,7 @@ elif [ "$1" = "-s" ];then
if [ ! -z "str_inst_ip" ];then
inst_ip_pre=`ip ro ls|grep -i ${str_inst_ip}|awk '{print $1}'|awk -F/ '{print $1}'`
if [ ! -z "inst_ip_pre" ];then
str_inst_mask=`route |grep ${inst_ip_pre}|awk '{print $3}'|head -1`
str_inst_mask=`route |grep ^${inst_ip_pre}|awk '{print $3}'|head -1`
fi
fi
fi
@ -450,7 +450,7 @@ elif [ "$1" = "-s" ];then
if [ ! -z "str_inst_ip" ];then
inst_ip_pre=`ip ro ls|grep -i ${str_inst_ip}|awk '{print $1}'|awk -F/ '{print $1}'`
if [ ! -z "inst_ip_pre" ];then
str_inst_mask=`route |grep ${inst_ip_pre}|awk '{print $3}'|head -1`
str_inst_mask=`route |grep ^${inst_ip_pre}|awk '{print $3}'|head -1`
fi
fi
fi
@ -473,7 +473,7 @@ elif [ "$1" = "-s" ];then
if [ ! -z "str_inst_ip" ];then
inst_ip_pre=`ip ro ls|grep -i ${str_inst_ip}|awk '{print $1}'|awk -F/ '{print $1}'`
if [ ! -z "inst_ip_pre" ];then
str_inst_mask=`route |grep ${inst_ip_pre}|awk '{print $3}'|head -1`
str_inst_mask=`route |grep ^${inst_ip_pre}|awk '{print $3}'|head -1`
fi
fi
fi