fix defect 3529041
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@12913 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
abcbfd3f3d
commit
bf2b0bee29
@ -36,7 +36,7 @@ my $logdir = "/var/log/xcat";
|
||||
if (!-d $logdir) {
|
||||
mkpath($logdir);
|
||||
}
|
||||
|
||||
$::NOERROR=0; # used to control whether to display an error
|
||||
$::sdate = `/bin/date`;
|
||||
chomp $::sdate;
|
||||
my $logfile = $logdir . "/xcat.log";
|
||||
@ -380,11 +380,13 @@ if ($nodesetstat eq 'standalone') {
|
||||
if ($nodesetstat eq 'diskless') {
|
||||
# see if BASECUST_REMOVAL is set in /etc/niminfo
|
||||
if (-f "/etc/niminfo") {
|
||||
$::NOERROR=1;
|
||||
$cmd = "cat /etc/niminfo | grep 'BASECUST_REMOVAL'";
|
||||
&runcmd($cmd);
|
||||
my $line = $::outref;
|
||||
my ($junk, $torm) = split(/=/, $line);
|
||||
|
||||
$::NOERROR=0;
|
||||
$cmd = "cat /etc/niminfo | grep 'NIM_HOSTNAME'";
|
||||
&runcmd($cmd);
|
||||
$line = $::outref;
|
||||
@ -561,8 +563,10 @@ sub runcmd
|
||||
$rc = $? >> 8;
|
||||
if ($rc > 0 && $logerr)
|
||||
{
|
||||
if ($::NOERROR == 0) { # print the error message
|
||||
print "$::sdate xcataixpost: run: $cmd - $::outref\n";
|
||||
print $::LOG_FILE "$::sdate xcataixpost: run: $cmd - $::outref\n";
|
||||
}
|
||||
print $::LOG_FILE "$::sdate xcataixpost: run: $cmd - $::outref\n";
|
||||
}
|
||||
}
|
||||
return $rc;
|
||||
|
Loading…
Reference in New Issue
Block a user