From 33f3c05e6a80bee66aa25850eef15cfe1b511183 Mon Sep 17 00:00:00 2001 From: bybai Date: Mon, 1 Feb 2016 02:55:20 -0500 Subject: [PATCH 1/4] fix 630 only the nictypes of the first lower interface is checked --- xCAT/postscripts/confignetwork | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/xCAT/postscripts/confignetwork b/xCAT/postscripts/confignetwork index 8c9dcca90..dc5593e01 100755 --- a/xCAT/postscripts/confignetwork +++ b/xCAT/postscripts/confignetwork @@ -249,11 +249,21 @@ function sort_nics_device_order { #find nicdevice type as base_nic_type base_nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $2}'` if echo "$base_nic_dev"|grep "@" >/dev/null; then - temp_base_nic_dev=`echo $base_nic_dev|awk -F@ '{print $1}'` + for i in `echo "$base_nic_dev" |sed 's/@/ /g'` + do + temp_base_nic_type=`find_nic_type "$i"` + #all base ni devices types should be ethernet + #if one nic type is not ethernet, it is invalid + if [ x"$temp_base_nic_type" != "xethernet" ]; then + break + fi + done else temp_base_nic_dev=$base_nic_dev + temp_base_nic_type=`find_nic_type "temp_base_nic_dev"` fi - base_nic_type=`find_nic_type "$temp_base_nic_dev"` + + base_nic_type=$temp_base_nic_type nic_dev=`echo "$nics_list" |sed -n "${num}p"|awk '{print $1}'` nic_dev_type=`find_nic_type "$nic_dev"` From 1aad72df267b44ee472dddb6e1d91d40cb96c885 Mon Sep 17 00:00:00 2001 From: bybai Date: Tue, 16 Feb 2016 03:05:30 -0500 Subject: [PATCH 2/4] polish issue 630 fix --- xCAT/postscripts/confignetwork | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/confignetwork b/xCAT/postscripts/confignetwork index dc5593e01..56a2fe8ef 100755 --- a/xCAT/postscripts/confignetwork +++ b/xCAT/postscripts/confignetwork @@ -252,9 +252,9 @@ function sort_nics_device_order { for i in `echo "$base_nic_dev" |sed 's/@/ /g'` do temp_base_nic_type=`find_nic_type "$i"` - #all base ni devices types should be ethernet - #if one nic type is not ethernet, it is invalid - if [ x"$temp_base_nic_type" != "xethernet" ]; then + temp_base_nic_type_one=$temp_base_nic_type + #all base nic devices types should be the same + if [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then break fi done From 263f0f685103d95d1b8e15b22b0d9b263be4fc3e Mon Sep 17 00:00:00 2001 From: bybai Date: Tue, 23 Feb 2016 01:43:30 -0500 Subject: [PATCH 3/4] polish fix 630 --- xCAT/postscripts/confignetwork | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/xCAT/postscripts/confignetwork b/xCAT/postscripts/confignetwork index 56a2fe8ef..a54814cfc 100755 --- a/xCAT/postscripts/confignetwork +++ b/xCAT/postscripts/confignetwork @@ -252,10 +252,14 @@ function sort_nics_device_order { for i in `echo "$base_nic_dev" |sed 's/@/ /g'` do temp_base_nic_type=`find_nic_type "$i"` - temp_base_nic_type_one=$temp_base_nic_type - #all base nic devices types should be the same - if [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then - break + if [ x"$temp_base_nic_type_one" = x ]; then + temp_base_nic_type_one=$temp_base_nic_type + else + #all base nic devices types should be the same + if [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then + break + fi + temp_base_nic_type_one=$temp_base_nic_type fi done else From dea6d6d0b8326fb0c71d708894d9c8d8ddd3d9aa Mon Sep 17 00:00:00 2001 From: bybai Date: Tue, 23 Feb 2016 02:37:15 -0500 Subject: [PATCH 4/4] polish fix 630 --- xCAT/postscripts/confignetwork | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/xCAT/postscripts/confignetwork b/xCAT/postscripts/confignetwork index a54814cfc..9dec758b0 100755 --- a/xCAT/postscripts/confignetwork +++ b/xCAT/postscripts/confignetwork @@ -254,12 +254,9 @@ function sort_nics_device_order { temp_base_nic_type=`find_nic_type "$i"` if [ x"$temp_base_nic_type_one" = x ]; then temp_base_nic_type_one=$temp_base_nic_type - else - #all base nic devices types should be the same - if [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then - break - fi - temp_base_nic_type_one=$temp_base_nic_type + elif [ x"$temp_base_nic_type" != x"$temp_base_nic_type_one" ]; then + log_error "different nic device types in $base_nic_dev." + break 2 fi done else