From d88759f805f680aa10f0e07a30abd2f7ac5b65c0 Mon Sep 17 00:00:00 2001 From: immarvin Date: Thu, 22 Nov 2012 08:58:21 +0000 Subject: [PATCH] add return value git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14402 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT/postscripts/confignimsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/xCAT/postscripts/confignimsh b/xCAT/postscripts/confignimsh index 2c9e64638..9c18db13e 100755 --- a/xCAT/postscripts/confignimsh +++ b/xCAT/postscripts/confignimsh @@ -37,6 +37,7 @@ use Socket; my $master = $ENV{'MASTER'}; my $mhost; my $shortmaster; +my $returnval=0; if ($master =~ /\d+\.\d+\.\d+\.\d+/) { my $packedaddr = inet_aton($master); @@ -77,7 +78,7 @@ if (-f "/.rhosts") { runcmd("mv /.rhost /.rhost.orig"); } -exit 0; +exit $returnval; sub runcmd { my $cmd = shift @_; @@ -86,6 +87,7 @@ sub runcmd { my $rc = $? >> 8; if ($rc) { system("logger -t xcat -p local4.err 'confignimsh: command $cmd failed with rc $rc: " . join('',@output) . "'"); + $returnval=$rc; exit $rc; } }