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:
parent
6c16503d37
commit
cca1e68ad8
@ -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");
|
||||
|
@ -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) {
|
||||
|
Loading…
Reference in New Issue
Block a user