enhance packimage/liteimg to copy /install/postscripts into the diskless images as /xcatpost

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13881 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2012-09-25 02:51:23 +00:00
parent 6c16503d37
commit cca1e68ad8
2 changed files with 18 additions and 0 deletions

View File

@ -171,6 +171,15 @@ sub process_request {
}
}
#before generating rootimg.gz, copy $installroot/postscripts into the image at /xcatpost
if( -e "$rootimg_dir/xcatpost" ) {
system("rm -rf $rootimg_dir/xcatpost");
}
system("mkdir -p $rootimg_dir/xcatpost");
system("cp -r $installroot/postscripts/* $rootimg_dir/xcatpost/");
# before generating rootimg.gz or rootimg.sfs, need to switch the rootimg to stateless mode if necessary
my $rootimg_status = 0; # 0 means stateless mode, while 1 means statelite mode
$rootimg_status = 1 if (-f "$rootimg_dir/.statelite/litefile.save");

View File

@ -163,6 +163,15 @@ sub process_request {
# - profile
$callback->({info=>["going to modify $rootimg_dir"]});
#copy $installroot/postscripts into the image at /xcatpost
if( -e "$rootimg_dir/xcatpost" ) {
system("rm -rf $rootimg_dir/xcatpost");
}
system("mkdir -p $rootimg_dir/xcatpost");
system("cp -r $installroot/postscripts/* $rootimg_dir/xcatpost/");
#get the root password for the node
my $passtab = xCAT::Table->new('passwd');
if ($passtab) {