From c980175be7be96db8c2f20d3805a20bb4c836c15 Mon Sep 17 00:00:00 2001 From: mxi1 Date: Fri, 16 Apr 2010 03:16:41 +0000 Subject: [PATCH] if the file with bind option doesn't exist in the rootimg, we should create one which is the fix for defect 2979871 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5789 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/statelite.pm | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/statelite.pm b/xCAT-server/lib/xcat/plugins/statelite.pm index 8996a8fb1..3bf9d4ec8 100644 --- a/xCAT-server/lib/xcat/plugins/statelite.pm +++ b/xCAT-server/lib/xcat/plugins/statelite.pm @@ -334,6 +334,18 @@ sub liteMe { my $rif = $rootimg_dir . $f; my $d = dirname($f); + # if no such file like $rif, create one + if ( !(-e "$rif") ) { + my $rifstr = $rif; + if($f =~ m{/$}) { + $verbose && $callback->({info=>["mkdir -p $rif"]}); + system("mkdir -p $rif"); + } else { + $verbose && $callback->({info=>["touch $rif"]}); + system("touch $rif"); + } + } + if( !(-e "$rootimg_dir/.default$d") ) { $verbose && $callback->({info=>["mkdir -p $rootimg_dir/.default$d"]}); system("mkdir -p $rootimg_dir/.default$d");