From 36581095279c7ef420d82a14490e7cbfc8e50e19 Mon Sep 17 00:00:00 2001 From: wangxiaopeng Date: Wed, 15 Jun 2016 20:37:16 -0400 Subject: [PATCH] issue 1304: fix the issue confignics -s cannot get the correct netmask for installnic --- xCAT/postscripts/configeth | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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