diff --git a/xCAT/postscripts/makeinitrd b/xCAT/postscripts/makeinitrd index c4a33ddc9..92cc928ef 100755 --- a/xCAT/postscripts/makeinitrd +++ b/xCAT/postscripts/makeinitrd @@ -16,5 +16,13 @@ if [[ -f /sbin/dracut ]]; then else # suse/sles 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 diff --git a/xCAT/postscripts/syscloneimgupdate b/xCAT/postscripts/syscloneimgupdate index 64e46dc87..10eb145f2 100755 --- a/xCAT/postscripts/syscloneimgupdate +++ b/xCAT/postscripts/syscloneimgupdate @@ -42,7 +42,7 @@ 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 @@ -51,5 +51,13 @@ if [[ -f /sbin/dracut ]]; then else # suse/sles 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