diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 524d97cbd..960920fe6 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -1070,16 +1070,18 @@ sub runcmd my $errout; open (PIPE, "$cmd |"); while () { + 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 diff --git a/xCAT-client/bin/genimage b/xCAT-client/bin/genimage index f3b6abed5..b474f906f 100755 --- a/xCAT-client/bin/genimage +++ b/xCAT-client/bin/genimage @@ -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"; }