Fixed a problem while adding kitrepodir from kit.conf

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14137 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
wanghuaz 2012-10-26 07:39:44 +00:00
parent d97f8338fa
commit 6c4a409e29

View File

@ -850,7 +850,6 @@ sub addkit
} elsif ( $sec =~ /KITREPO$/ ) {
if ( $key =~ /kitreponame/ ) {
$kitreponame = $value;
$kitrepohash{$kitreponame}{kitrepodir} = $kitdir."/repos/".$kitreponame;
} else {
$kitrepohash{$kitreponame}{$key} = $value;
}
@ -905,9 +904,13 @@ sub addkit
}
mkpath($kitdir);
# Set kitdir
# Set kitdir and kitrepodir
$kithash{$kitname}{kitdir} = $kitdir;
foreach my $kitreponame ( keys %kitrepohash ) {
$kitrepohash{$kitreponame}{kitrepodir} = $kitdir."/repos/".$kitreponame;
}
if($::VERBOSE){
my %rsp;
push@{ $rsp{data} }, "Copying Kit from $kittmpdir to $kitdir";