2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 09:36:41 +00:00
This commit is contained in:
bybai 2019-04-12 02:29:23 -04:00
parent 68925429a3
commit 8e343110c7
2 changed files with 2 additions and 4 deletions

View File

@ -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 <NIC>:<num_v4num> 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

View File

@ -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