mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-03 03:50:08 +00:00
unify ifcfg-* names
This commit is contained in:
parent
c6b322a6c3
commit
3bc96bf1d7
@ -660,7 +660,7 @@ elif [ "$1" = "-s" ];then
|
||||
str_inst_prefix=$(v4mask2prefix ${str_inst_mask})
|
||||
str_conf_file="/etc/sysconfig/network-scripts/ifcfg-${str_inst_nic}"
|
||||
if [ $networkmanager_active -eq 2 ]; then
|
||||
str_conf_file="/etc/sysconfig/network-scripts/ifcfg-xcat-${str_inst_nic}"
|
||||
str_conf_file="/etc/sysconfig/network-scripts/ifcfg-$con_name"
|
||||
fi
|
||||
if [ $networkmanager_active -eq 1 ]; then
|
||||
is_nmcli_connection_exist "$con_name"
|
||||
@ -682,7 +682,7 @@ elif [ "$1" = "-s" ];then
|
||||
echo "NETMASK=${str_inst_mask}" >> $str_conf_file
|
||||
echo "BOOTPROTO=none" >> $str_conf_file
|
||||
echo "ONBOOT=yes" >> $str_conf_file
|
||||
echo "NAME=xcat-${str_inst_nic}" >> $str_conf_file
|
||||
echo "NAME=${con_name}" >> $str_conf_file
|
||||
echo "HWADDR=${str_inst_mac}" >> $str_conf_file
|
||||
fi
|
||||
if [ $networkmanager_active -eq 2 ]; then
|
||||
|
@ -473,10 +473,10 @@ function configure_nicdevice {
|
||||
do
|
||||
nic_dev=`echo "$nics_pair" |sed -n "${num}p"|awk '{print $1}'`
|
||||
ipaddrs=$(find_nic_ips $nic_dev)
|
||||
contain_alias=$(echo $ipaddrs|grep "|")
|
||||
multiple_ips=$(echo $ipaddrs|grep "|")
|
||||
#If install nic is configured, skip to reconfigure it
|
||||
if [ x"$nic_dev" = x"$installnic" -a $instnic_conf -eq 1 -a x"$contain_alias" = x ]; then
|
||||
log_warn "install nic $nic_dev has been configured, skip to reconfigure it $contain_alias."
|
||||
if [ x"$nic_dev" = x"$installnic" -a $instnic_conf -eq 1 -a x"$multiple_ips" = x ]; then
|
||||
log_warn "install nic $nic_dev has been configured, continue."
|
||||
((num+=1))
|
||||
continue
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user