git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@5132 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
vallard 2010-02-04 06:03:24 +00:00
parent 4a8403596c
commit 1c38bfa4e4

View File

@ -1383,17 +1383,17 @@ sub nodels
#########
# tabch
#########
sub tabch {
my $args = shift;
my $callback = shift;
my @ARGV = @{$args};
my $delete = 0;
my $fo = $ARGV[0];
if($ARGV[0] =~ /^-d$/){
if ($ARGV[0] =~ /^-d$/){
shift @ARGV;
$delete = 1;
}
my $target = shift @ARGV;
my %tables;
my %keyhash=();
@ -1409,7 +1409,6 @@ sub tabch {
unshift(@ARGV, $target);
}
if($delete){
my @tables_to_del=@ARGV;
if(@tables_to_del == 0){
@ -1439,8 +1438,16 @@ sub tabch {
$callback->({error => [ "Table $table does not exist."],errorcode=>[1]});
}
}
$tableupdates{$table}{$column}=$value;
$tableupdates{$table}{$column}=$value;
}
#commit all the changes
foreach (keys %tables) {
if (exists($tableupdates{$_})) {
$tables{$_}->setAttribs(\%keyhash,\%{$tableupdates{$_}});
}
$tables{$_}->commit;
}
#commit all the changes
foreach (keys %tables) {