Backport 2 genimage fixes from 2.8: 1) genimage with osimage prints empty values for os, profile, interface 2) genimage prints a blank line between every line of output
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@14300 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
3f8c9bced2
commit
7bb0967496
@ -1070,16 +1070,18 @@ sub runcmd
|
||||
my $errout;
|
||||
open (PIPE, "$cmd |");
|
||||
while (<PIPE>) {
|
||||
push @$outref, $_;
|
||||
chomp; # get rid of the newline, because the client will add one
|
||||
if ($::CALLBACK){
|
||||
$rsp->{data}->[0] = $_;
|
||||
$::CALLBACK->($rsp);
|
||||
} else {
|
||||
xCAT::MsgUtils->message("D", "$_");
|
||||
}
|
||||
$output .= $_;
|
||||
#$output .= $_;
|
||||
}
|
||||
# store the return string
|
||||
push @$outref,$output;
|
||||
#push @$outref,$output;
|
||||
}
|
||||
|
||||
# now if not streaming process errors
|
||||
|
@ -210,7 +210,7 @@ if ((!$imagename) && (!$os)){
|
||||
|
||||
chomp($os);
|
||||
}
|
||||
print " OS: $os\n";
|
||||
if ($os) { print " OS: $os\n"; }
|
||||
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@ if ((!$imagename) && (!$profile)){
|
||||
}
|
||||
}
|
||||
}
|
||||
print " Profile: $profile\n";
|
||||
if ($profile) { print " Profile: $profile\n"; }
|
||||
|
||||
# get the interface
|
||||
if ((!$imagename) && (!$interface)){
|
||||
@ -309,7 +309,7 @@ if ((!$imagename) && (!$interface)){
|
||||
}
|
||||
}
|
||||
}
|
||||
print " Interface: $interface\n";
|
||||
if ($interface) { print " Interface: $interface\n"; }
|
||||
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user