add the image name and timestamp into diskless image when it is packed

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15434 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
jjhua 2013-03-08 06:07:30 +00:00
parent 20ff90225a
commit 7ab0cf1ffd

View File

@ -179,6 +179,13 @@ sub process_request {
system("mkdir -p $rootimg_dir/xcatpost");
system("cp -r $installroot/postscripts/* $rootimg_dir/xcatpost/");
#put the image name and timestamp into diskless image when it is packed.
`echo IMAGENAME="'$imagename'" > $rootimg_dir/opt/xcat/xcatinfo`;
my $timestamp = `date`;
chomp $timestamp;
`echo TIMESTAMP="'$timestamp'" >> $rootimg_dir/opt/xcat/xcatinfo`;
# 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