Removed copybootscript. Moved to packimage.
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1176 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
96b35c6149
commit
750808bf0f
@ -304,7 +304,6 @@ sub isnetdriver {
|
||||
|
||||
sub postscripts { # TODO: customized postscripts
|
||||
generic_post();
|
||||
copybootscript();
|
||||
if (-d "$installroot/postscripts/hostkeys") {
|
||||
for my $key (<$installroot/postscripts/hostkeys/*key>) {
|
||||
copy ($key,"$installroot/netboot/$osver/$arch/$profile/rootimg/etc/ssh/");
|
||||
@ -370,46 +369,3 @@ sub generic_post { #This function is meant to leave the image in a state approxi
|
||||
rename(<$installroot/netboot/$osver/$arch/$profile/rootimg/boot/vmlinuz*>,"$installroot/netboot/$osver/$arch/$profile/kernel");
|
||||
}
|
||||
|
||||
###########################################################
|
||||
#
|
||||
# copybootscript - copy the xCAT diskless init scripts to the image
|
||||
#
|
||||
#############################################################
|
||||
sub copybootscript {
|
||||
|
||||
if ( -f "$installroot/postscripts/xcatdsklspost") {
|
||||
|
||||
# copy the xCAT diskless post script to the image
|
||||
mkpath("$installroot/netboot/$osver/$arch/$profile/rootimg/opt/xcat");
|
||||
|
||||
copy ("$installroot/postscripts/xcatdsklspost", "$installroot/netboot/$osver/$arch/$profile/rootimg/opt/xcat/xcatdsklspost");
|
||||
|
||||
chmod(0755,"$installroot/netboot/$osver/$arch/$profile/rootimg/opt/xcat/xcatdsklspost");
|
||||
|
||||
} else {
|
||||
print "Could not find the script $installroot/postscripts/xcatdsklspost.\n";
|
||||
return 1;
|
||||
}
|
||||
|
||||
if ( -f "$installroot/postscripts/xcatpostinit") {
|
||||
|
||||
# copy the linux diskless init script to the image
|
||||
# - & set the permissions
|
||||
copy ("$installroot/postscripts/xcatpostinit","$installroot/netboot/$osver/$arch/$profile/rootimg/etc/init.d/xcatpostinit");
|
||||
|
||||
chmod(0755,"$installroot/netboot/$osver/$arch/$profile/rootimg/etc/init.d/xcatpostinit");
|
||||
|
||||
# run chkconfig
|
||||
my $chkcmd = "chroot $installroot/netboot/$osver/$arch/$profile/rootimg chkconfig --add xcatpostinit";
|
||||
|
||||
my $rc = system($chkcmd);
|
||||
if ($rc) {
|
||||
print "Could not run the chkconfig command.\n";
|
||||
return 1;
|
||||
}
|
||||
} else {
|
||||
print "Could not find the script $installroot/postscripts/xcatpostinit.\n";
|
||||
return 1;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user