Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core
This commit is contained in:
commit
a2332700d5
@ -628,7 +628,7 @@ else
|
||||
str_nic_status='down'
|
||||
str_his_file=${str_cfg_dir}xcat_history_important
|
||||
|
||||
str_history=`ip addr show dev $str_nic_name | grep inet | grep -iv dynamic | grep -iv link | awk '{print $2}'`
|
||||
str_history=`ip addr show dev $str_nic_name | grep inet | grep -iv dynamic | grep -iv link | grep $str_nic_name | awk '{print $2}'`
|
||||
old_ifs=$IFS
|
||||
IFS=$'\n'
|
||||
array_ip_old_temp=($str_history)
|
||||
|
@ -10,11 +10,19 @@
|
||||
# And do whatever is necessary on ubuntu.
|
||||
|
||||
if [[ -f /sbin/dracut ]]; then
|
||||
# redhat/centos
|
||||
# redhat6.x/centos6.x
|
||||
echo "Running dracut to regenerate the initrd with the drivers needed by this node:"
|
||||
dracut --force
|
||||
else
|
||||
# suse/sles
|
||||
# suse/sles and redhat5.x/centos5.x
|
||||
echo "Running mkinitrd to regenerate the initrd with the drivers needed by this node:"
|
||||
mkinitrd
|
||||
osvers=`cat /etc/*release|sed -e 's/.*\([0-9]\{1,\}\.[0-9]\{1,\}\).*/\1/'`
|
||||
if [[ $osvers == 5\.* ]];then
|
||||
initrdfile=`find /boot -name "initrd-*.img"`
|
||||
kernelversion=`echo $initrdfile |sed -e 's:/boot/initrd-\(.*\)\.img:\1:g'`
|
||||
mv $initrdfile $initrdfile.org
|
||||
mkinitrd $initrdfile $kernelversion
|
||||
else
|
||||
mkinitrd
|
||||
fi
|
||||
fi
|
||||
|
@ -42,14 +42,22 @@ fi
|
||||
str_server_ip=`echo $str_server_ip | sed "s/'//g"`
|
||||
#call system imager command to update the image
|
||||
echo "si_updateclient --server $str_server_ip --yes"
|
||||
export PERL5LIB=/usr/lib/perl5/site_perl/;LANG=C si_updateclient --server $str_server_ip --yes --no-bootloader
|
||||
export PERL5LIB=/usr/lib/perl5/site_perl/;LANG=C si_updateclient --server $str_server_ip --yes
|
||||
|
||||
if [[ -f /sbin/dracut ]]; then
|
||||
#redhat or centos
|
||||
# redhat6.x/centos6.x
|
||||
echo "Running dracut to regenerate the initrd with the drivers needed by this node:"
|
||||
dracut --force
|
||||
else
|
||||
# suse/sles
|
||||
# suse/sles and redhat5.x/centos5.x
|
||||
echo "Running mkinitrd to regenerate the initrd with the drivers needed by this node:"
|
||||
mkinitrd
|
||||
osvers=`cat /etc/*release|sed -e 's/.*\([0-9]\{1,\}\.[0-9]\{1,\}\).*/\1/'`
|
||||
if [[ $osvers == 5\.* ]];then
|
||||
initrdfile=`find /boot -name "initrd-*.img"`
|
||||
kernelversion=`echo $initrdfile |sed -e 's:/boot/initrd-\(.*\)\.img:\1:g'`
|
||||
mv $initrdfile $initrdfile.org
|
||||
mkinitrd $initrdfile $kernelversion
|
||||
else
|
||||
mkinitrd
|
||||
fi
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user