From 750808bf0fe84c04bfbebc946d0808a156554c6c Mon Sep 17 00:00:00 2001 From: nott Date: Wed, 23 Apr 2008 20:06:52 +0000 Subject: [PATCH] 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 --- .../share/xcat/netboot/rh/genimage | 44 ------------------- 1 file changed, 44 deletions(-) diff --git a/xCAT-server-2.0/share/xcat/netboot/rh/genimage b/xCAT-server-2.0/share/xcat/netboot/rh/genimage index 17112240e..d4db3c822 100755 --- a/xCAT-server-2.0/share/xcat/netboot/rh/genimage +++ b/xCAT-server-2.0/share/xcat/netboot/rh/genimage @@ -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; -}