From 4d95ec79692d2af2fe294eecf142bcf32a1a8cda Mon Sep 17 00:00:00 2001 From: jjhua Date: Mon, 2 Jul 2012 06:15:33 +0000 Subject: [PATCH] fixed bug 3538093, create a temporary uname in the image's rootimg dir before running the postinstall and remove it after postinstall during genimage git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13221 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/rh/genimage | 28 ++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 6c468fa8f..5ef1a0e13 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -479,6 +479,31 @@ unless ($imagename) { if (($postinstall_filename) && (-x $postinstall_filename)) { + #For Mellonax IB script. In diskless image, the uname -r not returning the rootimg level, + #because the "uname -r" only returns the version of the kernel in use + #create a temporary uname script. for every flag except for -r, it should just call the real + #uname with the same flags and return that info. + if(!( -e "$rootimg_dir/bin/orig_uname")) { + system("mv $rootimg_dir/bin/uname $rootimg_dir/bin/orig_uname"); + } + my $tmpuname; + open($tmpuname,">","$rootimg_dir/bin/uname"); + print $tmpuname <