add return value
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14402 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
53e843bed1
commit
d88759f805
@ -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;
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user