2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-22 11:10:24 +00:00

return errorcode 1 if failed for xcatprobe switch_macmap

This commit is contained in:
ertaozh
2017-08-14 02:22:21 -04:00
parent f9cc8f71b9
commit 94009a475d

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;