2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

keep configeth -s run first

This commit is contained in:
bybai 2019-03-27 01:06:30 -04:00
parent 1d36f56327
commit 57465fc515

View File

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