diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth index 915d5e840..6e82999e3 100755 --- a/xCAT/postscripts/configeth +++ b/xCAT/postscripts/configeth @@ -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