-Have genimage/genitrd look in the chroot target before local fs (sf bug 1966183)

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1442 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2008-05-19 17:38:12 +00:00
parent 91caa34007
commit 05267bdd4d

View File

@ -164,7 +164,9 @@ sub mkinitrd {
rename(<$installroot/netboot/$osver/$arch/$profile/rootimg/boot/vmlinuz*>,"$installroot/netboot/$osver/$arch/$profile/kernel");
}
else {
if(-r "/boot/vmlinuz-$kernelver") {
if(-r "$installroot/netboot/$osver/$arch/$profile/rootimg/boot/boot/vmlinuz-$kernelver") {
rename("$installroot/netboot/$osver/$arch/$profile/rootimg/boot/vmlinuz-$kernelver","$installroot/netboot/$osver/$arch/$profile/kernel");
} elsif(-r "/boot/vmlinuz-$kernelver") {
copy("/boot/vmlinuz-$kernelver","$installroot/netboot/$osver/$arch/$profile/kernel");
}
else {
@ -354,12 +356,14 @@ EOMS
push @filestoadd,keys %libhash;
if($basekernelver ne $kernelver) {
system("rm -rf $installroot/netboot/$osver/$arch/$profile/rootimg/lib/modules/$basekernelver");
if(-d "/lib/modules/$kernelver") {
system("cd /lib/modules;cp -r $kernelver $installroot/netboot/$osver/$arch/$profile/rootimg/lib/modules/");
}
else {
die("Cannot read /lib/modules/$kernelver");
}
unless (-d "$installroot/netboot/$osver/$arch/$profile/rootimg/lib/modules/$kernelver") {
if(-d "/lib/modules/$kernelver") {
system("cd /lib/modules;cp -r $kernelver $installroot/netboot/$osver/$arch/$profile/rootimg/lib/modules/");
}
else {
die("Cannot read /lib/modules/$kernelver");
}
}
}
find(\&isnetdriver, <$installroot/netboot/$osver/$arch/$profile/rootimg/lib/modules/$kernelver/*>);
foreach (@filestoadd) {