From 8e343110c7fc0da692b83532277a40aecc3ad17c Mon Sep 17 00:00:00 2001 From: bybai Date: Fri, 12 Apr 2019 02:29:23 -0400 Subject: [PATCH] polishe --- xCAT/postscripts/configeth | 2 +- xCAT/postscripts/confignetwork | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/xCAT/postscripts/configeth b/xCAT/postscripts/configeth index 6e540fe4e..98807699e 100755 --- a/xCAT/postscripts/configeth +++ b/xCAT/postscripts/configeth @@ -171,11 +171,11 @@ function configipv4(){ echo "NETMASK$num_v4num=${str_v4mask}" >> $str_conf_file fi else - str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${str_if_name}" #If using network service, the NIC alias device format is : like eth0:1 if [ $num_v4num -ne 0 ]; then str_if_name=${str_if_name}:${num_v4num} fi + str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${str_if_name}" echo "DEVICE=${str_if_name}" > $str_conf_file echo "BOOTPROTO=none" >> $str_conf_file echo "NM_CONTROLLED=no" >> $str_conf_file diff --git a/xCAT/postscripts/confignetwork b/xCAT/postscripts/confignetwork index 1389836cb..9f96a4bda 100755 --- a/xCAT/postscripts/confignetwork +++ b/xCAT/postscripts/confignetwork @@ -563,8 +563,6 @@ function configure_nicdevice { #linux bridge type is bridge #openvswitch bridge type is bridge_ovs elif [ x"$nic_dev_type" = "xbridge_ovs" -o x"$nic_dev_type" = "xbridge" ]; then - ps -ef|grep -v grep|grep NetworkManager >/dev/null 2>/dev/null - nmcli_used=$? if [ "$networkmanager_active" != "1" ]; then if [ "$networkmanager_active" = "0" ]; then check_brctl $nic_dev_type @@ -572,7 +570,7 @@ function configure_nicdevice { errorcode=1 else create_bridge_interface ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type - if + fi else create_bridge_interface ifname=$nic_dev _brtype=$nic_dev_type _port=$base_nic_dev _pretype=$base_nic_type fi