Merge branch 'master' of ssh://git.code.sf.net/p/xcat/xcat-core

This commit is contained in:
Jia Zhao 2014-08-20 16:56:02 +08:00
commit a2332700d5
3 changed files with 24 additions and 8 deletions

View File

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

View File

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

View File

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