mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
Merge pull request #6179 from bybai/cfg_sle
add wicked check in confignetwork for sles
This commit is contained in:
commit
499bfef96a
@ -695,7 +695,7 @@ elif [ "$1" = "-s" ];then
|
||||
nmcli con up $con_name
|
||||
wait_for_ifstate $str_inst_nic UP 10 5
|
||||
else
|
||||
ip link set dev $str_inst_nic up
|
||||
ifup $str_inst_nic
|
||||
fi
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
@ -1111,7 +1111,7 @@ else
|
||||
nmcli con up $con_name
|
||||
wait_for_ifstate $str_nic_name UP 10 10
|
||||
else
|
||||
ip link set dev $str_nic_name up
|
||||
ifup $str_nic_name
|
||||
fi
|
||||
if [ $? -ne 0 ]; then
|
||||
log_error "bring $str_nic_name up failed."
|
||||
|
@ -633,6 +633,27 @@ errorcode=0
|
||||
#nictypes should support capital letters, for example, Ethernet and ethernet
|
||||
utolcmd="sed -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/"
|
||||
|
||||
#get for installnic
|
||||
installnic=''
|
||||
installnic=`get_installnic`
|
||||
instnic_conf=0
|
||||
if [ $boot_install_nic -eq 1 ];then
|
||||
if [ -n "$installnic" ]; then
|
||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
log_info "configure the install nic $installnic. "
|
||||
instnic_conf=1
|
||||
configeth -s $installnic
|
||||
if [ $? -ne 0 ]; then
|
||||
errorcode=1
|
||||
fi
|
||||
get_nic_cfg_file_content $installnic
|
||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
else
|
||||
log_error "Can not determine proper install nic."
|
||||
errorcode=1
|
||||
fi
|
||||
fi
|
||||
|
||||
#check if using NetworkManager or network service
|
||||
networkmanager_active=2
|
||||
check_NetworkManager_or_network_service
|
||||
@ -656,27 +677,6 @@ if [ $? -ne 0 ]; then
|
||||
fi
|
||||
fi
|
||||
|
||||
#get for installnic
|
||||
installnic=''
|
||||
installnic=`get_installnic`
|
||||
instnic_conf=0
|
||||
if [ $boot_install_nic -eq 1 ];then
|
||||
if [ -n "$installnic" ]; then
|
||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
log_info "configure the install nic $installnic. "
|
||||
instnic_conf=1
|
||||
configeth -s $installnic
|
||||
if [ $? -ne 0 ]; then
|
||||
errorcode=1
|
||||
fi
|
||||
get_nic_cfg_file_content $installnic
|
||||
echo "++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++"
|
||||
else
|
||||
log_error "Can not determine proper install nic."
|
||||
errorcode=1
|
||||
fi
|
||||
fi
|
||||
|
||||
#replace | with "@", for example, eth1|eth2 ----> eth1@eth2
|
||||
nicdevice=`echo "$NICDEVICES" | sed 's/|/@/g'`
|
||||
|
||||
|
@ -1602,7 +1602,7 @@ function check_NetworkManager_or_network_service() {
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
checkservicestatus network > /dev/null 2>/dev/null
|
||||
checkservicestatus network > /dev/null 2>/dev/null || checkservicestatus wicked > /dev/null 2>/dev/null
|
||||
if [ $? -eq 0 ]; then
|
||||
stopservice NetworkManager | log_lines info
|
||||
disableservice NetworkManager | log_lines info
|
||||
|
Loading…
x
Reference in New Issue
Block a user