diff --git a/xCAT-server/share/xcat/netboot/sles/genimage b/xCAT-server/share/xcat/netboot/sles/genimage index 18f75e047..ad6462a35 100755 --- a/xCAT-server/share/xcat/netboot/sles/genimage +++ b/xCAT-server/share/xcat/netboot/sles/genimage @@ -571,6 +571,31 @@ unless ($imagename) { if (($postinstall_filename) && (-x $postinstall_filename)) { #print "postinstall_filename=$postinstall_filename\n"; + #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 <