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");