From 6c44423812c25262d57b50c69390bb4272c4b20a Mon Sep 17 00:00:00 2001 From: ligc Date: Thu, 6 Mar 2014 09:14:41 +0800 Subject: [PATCH] fix for bug 4458: check the return value from Table.pm::setAttribs --- xCAT-server/sbin/chtab | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/xCAT-server/sbin/chtab b/xCAT-server/sbin/chtab index 3d1822244..ae2a447ff 100755 --- a/xCAT-server/sbin/chtab +++ b/xCAT-server/sbin/chtab @@ -153,9 +153,14 @@ else { #commit all the changes foreach (keys %tables) { if (exists($tableupdates{$_})) { - $tables{$_}->setAttribs(\%keyhash,\%{$tableupdates{$_}}); + my $rc = $tables{$_}->setAttribs(\%keyhash,\%{$tableupdates{$_}}); + if ($rc) { + $::exitcode = 1; + } } $tables{$_}->commit; } } - +if ($::exitcode) { + exit $::exitcode; +}