-defect 2987052 is fixed;

before the copy command, make sure the required kernel file is there,
if there's no one, returen one error message;



git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5795 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
mxi1 2010-04-16 10:48:27 +00:00
parent 4c5be2b723
commit 27982a9e39

View File

@ -1211,9 +1211,23 @@ sub generic_post { #This function is meant to leave the image in a state approxi
system("ln -s ../gettyset $rootimg_dir/etc/init.d/rc3.d/S60gettyset");
}
if(($osver =~ /sles11/) || ($osver =~ /sles10/)) {#for sles11,sles10
copy(<$rootimg_dir/boot/vmlinux-*>,"$destdir/kernel");
if(-e <$rootimg_dir/boot/vmlinux-*>) {
copy(<$rootimg_dir/boot/vmlinux-*>,"$destdir/kernel");
} else {
unless (-e "$destdir/kernel") {
print qq{Error: couldn't find the suitable kernel in $rootimg_dir/boot/ directory and $destdir directory};
exit 1;
}
}
}else {
copy(<$rootimg_dir/boot/vmlinuz-*>,"$destdir/kernel");
if(-e <$rootimg_dir/boot/vmlinuz-*>) {
copy(<$rootimg_dir/boot/vmlinuz-*>,"$destdir/kernel");
} else {
unless (-e "$destdir/kernel") {
print qq{Error: couldn't find the suitable kernel in $rootimg_dir/boot/ directory and $destdir directory};
exit 1;
}
}
}
}