Fix CentOS netboot image build to have correct paths

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@39 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jbjohnso 2007-11-06 22:10:23 +00:00
parent 89a13f0618
commit e74a7bcedb

View File

@ -106,8 +106,8 @@ sub mknetboot {
}
}
$restab->setNodeAttribs($node,{
kernel=>"xcat/netboot/$osver/$arch/kernel",
initrd=>"xcat/netboot/$osver/$arch/rootimg.gz",
kernel=>"xcat/netboot/$osver/$arch/$profile/kernel",
initrd=>"xcat/netboot/$osver/$arch/$profile/rootimg.gz",
kcmdline=>$kcmdline
});
}
@ -154,14 +154,15 @@ sub makenetboot {
for my $key (<$installroot/postscripts/hostkeys/*key>) {
copy ($key,"$installroot/netboot/$osver/$arch/$profile/rootimg/etc/ssh/");
}
chmod 0600,</$installroot/netboot/$osver/$arch/$profile/rootimg/etc/ssh/*key>;
}
if (-d "/$installroot/postscripts/.ssh") {
mkdir("/$installroot/root/.ssh");
chmod(0700,"/$installroot/root/.ssh");
mkpath("/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh");
chmod(0700,"/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/");
for my $file (</$installroot/postscripts/.ssh/*>) {
copy ($key,"/$installroot/root/.ssh/");
copy ($file,"/$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/");
}
chmod(0600,</$installroot/root/.ssh/*>);
chmod(0600,</$installroot/netboot/$osver/$arch/$profile/rootimg/root/.ssh/*>);
}
my $oldpath=cwd;
chdir("$installroot/netboot/$osver/$arch/$profile/rootimg");