add one limitation to the options in litefile table, when both one directory and its sub-items are in the litefile table

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@6353 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
mxi1 2010-06-04 09:39:17 +00:00
parent 54c783dbd4
commit cd566a825c

View File

@ -220,17 +220,26 @@ sub process_request {
foreach my $entry (keys %hashNew) {
my @tmp = split (/\s+/, $entry);
if ($hashNew{$entry} and $tmp[1] =~ m/persistent/) {
if ($hashNew{$entry}) {
foreach my $child ( @{$hashNew{$entry}} ) {
my @tmpc = split (/\s+/, $child);
unless ( $tmpc[1] =~ m/persistent/ ) {
my $f = $tmp[2];
my $fc = $tmpc[2];
my $f = $tmp[2];
my $fc = $tmpc[2];
if ($tmp[1] =~ m/bind/ && $tmpc[1] !~ m/bind/) {
$callback->({error=>["$fc should have bind options like $f "], errorcode=> [ 1]});
return;
}
if ($tmp[1] =~ m/tmpfs/ && $tmpc[1] =~ m/bind/) {
$callback->({error=>["$fc shouldnot use bind options "], errorcode=> [ 1]});
return;
}
if ($tmp[1] =~ m/persistent/ && $tmpc[1] !~ m/persistent/) {
$callback->({error=>["$fc should have persistent option like $f "], errorcode=> [ 1]});
return;
}
}
}
}
# backup the file/directory before recovering the files in litefile.save