From 8eabe3293a108a435ea558d9641bc8538303266c Mon Sep 17 00:00:00 2001 From: linggao Date: Fri, 5 Mar 2010 22:04:11 +0000 Subject: [PATCH] bug fix for statelite git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5394 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/statelite.pm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index 0e5357478..33c564ac3 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -271,6 +271,16 @@ sub liteMe { my $sym = "1"; # sym = 0 means no symlinks, just bindmount if($sym){ foreach my $f (@$files){ + #check if the file has been moved to .default by its parent or by last liteimg, if yes, then do nothing + my $ret=`readlink -m $rootimg_dir$f`; + if ($? == 0) { + if ($ret =~ /$rootimg_dir\/.default/) + { + $verbose && $callback->({info=>["do nothing for file $f"]}); + next; + } + } + # copy the file to /.defaults my $rif = $rootimg_dir . $f; my $d = dirname($f);