2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-30 17:46:38 +00:00

Merge pull request #3680 from zet809/modify_return_code_for_switchmacmap

return errorcode 1 if failed for xcatprobe switch_macmap
This commit is contained in:
Weihua Hu 2017-08-14 15:55:58 +08:00 committed by GitHub
commit 77ece332c0

View File

@ -120,6 +120,7 @@ foreach (<$fd>) {
}
}
close($fd);
my $rc = 0;
if (-f $normal_file) {
unlink($normal_file);
}
@ -129,8 +130,10 @@ if (-f $error_file) {
if (@error_nodes) {
my $error_node = join(",", @error_nodes);
probe_utils->send_msg("$output", "d", "[$error_node] : Error, switch-macmap can only be run against xCAT objects that have 'nodetype=switch'");
$rc = 1;
}
foreach (@fails) {
probe_utils->send_msg("$output", "f", "$_");
$rc = 1;
}
exit 0;
exit $rc;