From 5eaf51ad77212591b6d92076b79385e8d52fb963 Mon Sep 17 00:00:00 2001 From: jjhua Date: Fri, 8 Mar 2013 06:06:39 +0000 Subject: [PATCH] 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/branches/2.8@15433 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/packimage.pm | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/packimage.pm b/xCAT-server/lib/xcat/plugins/packimage.pm index e870e3610..7c8b740f6 100644 --- a/xCAT-server/lib/xcat/plugins/packimage.pm +++ b/xCAT-server/lib/xcat/plugins/packimage.pm @@ -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