From 9f6781f3164c3d3689c236c7dac061306294e9fb Mon Sep 17 00:00:00 2001 From: mxi1 Date: Tue, 21 Dec 2010 03:22:09 +0000 Subject: [PATCH] for defect 3139537; fixed the defect to handle the relative path related with "../add-on/statelite/rc.statelite". git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@8492 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/share/xcat/netboot/rh/genimage | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/xCAT-server/share/xcat/netboot/rh/genimage b/xCAT-server/share/xcat/netboot/rh/genimage index 0c7ad1c2f..7f72b3648 100755 --- a/xCAT-server/share/xcat/netboot/rh/genimage +++ b/xCAT-server/share/xcat/netboot/rh/genimage @@ -594,12 +594,13 @@ mkpath "$rootimg_dir/.statelite"; # create place for NFS mounts. # this script will get the directories. # TODO: the file is re-copied in liteimg.pm -unless (-f "../add-on/statelite/rc.statelite") { - print "Can't find ../add-on/statelite/rc.statelite!\n"; +my $cwd = $FindBin::Bin; +unless (-f "$cwd/../add-on/statelite/rc.statelite") { + print "Can't find $cwd/../add-on/statelite/rc.statelite!\n"; exit 1; } -system("cp ../add-on/statelite/rc.statelite $rootimg_dir/etc/init.d/statelite"); +system("cp $cwd/../add-on/statelite/rc.statelite $rootimg_dir/etc/init.d/statelite"); # also need to add this file: # may have already been made into a symbolic link, if so ignore it