Added {profile}.postinstall functionality. Idea is to generate image automatically, allowing user to install custom packages or change some files in the image during image generation phase, thus making image generation human-error prone.
{profile}.postinstall script is run after all packages from $profile.pkglist are installed. This makes possible to do any kind of magic with the image. Example sles/compute.postinstall provided. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@2119 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
a0200d9013
commit
0d56a54ddf
@ -150,6 +150,16 @@ unless ($onlyinitrd) {
|
||||
postscripts(); #run 'postscripts'
|
||||
}
|
||||
unlink "/tmp/genimage.$$.yum.conf";
|
||||
|
||||
#-- run postinstall script
|
||||
if (-x "$pathtofiles/$profile.postinstall") {
|
||||
my $rc = system("$pathtofiles/$profile.postinstall","$installroot/netboot/$osver/$arch/$profile/rootimg",$osver,$arch,$profile);
|
||||
if ($rc) {
|
||||
print "postinstall script failed\n";
|
||||
exit 1;
|
||||
}
|
||||
}
|
||||
|
||||
mkinitrd();
|
||||
|
||||
sub getlibs {
|
||||
|
Loading…
Reference in New Issue
Block a user