2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-13 01:40:26 +00:00

Merge pull request #1370 from immarvin/onmkdeftemplate

fix issue  [FVT]lsdef/mkdef commands <Error: Unsupported request error> on rh6.8 ppc64 #1369 @github
This commit is contained in:
Xiaopeng Wang
2016-06-23 15:07:08 +08:00
committed by GitHub

View File

@ -669,8 +669,7 @@ sub processArgs
#if "-a" is not specified, read the template files content
#under "/opt/xcat/share/xcat/templates/objects/<object type>"
my $objfiledata;
find(\&wanted,@tmpldirlist);
sub wanted{
my $wanted= sub {
if (-f $_){
my $line;
open(FH,$_);
@ -679,7 +678,9 @@ sub processArgs
}
close(FH)
}
}
};
find($wanted,@tmpldirlist);
#save the template definitions in global variable $::filedata
#for the later parse
@ -3183,7 +3184,8 @@ sub defls
}
else{
#push the unique object types from @::fileobjtypes to @::clobjtypes
push @::clobjtypes, keys { map { $_ => 1 } @::fileobjtypes };
my %objtypehash=map { $_ => 1 } @::fileobjtypes;
push @::clobjtypes, keys(%objtypehash);
}
} # end - if specify all