From dd11950993f14379505ac18a73dece420c2b2b48 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Wed, 24 Oct 2012 15:37:47 +0000 Subject: [PATCH] chomped newlines from runcmd streaming output and updated site.runbootscripts description git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14111 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- perl-xCAT/xCAT/Client.pm | 4 ++-- perl-xCAT/xCAT/Schema.pm | 6 ++++-- perl-xCAT/xCAT/Utils.pm | 6 ++++-- xCAT-client/bin/genimage | 6 +++--- 4 files changed, 13 insertions(+), 9 deletions(-) diff --git a/perl-xCAT/xCAT/Client.pm b/perl-xCAT/xCAT/Client.pm index 89bc5a343..2b9471095 100644 --- a/perl-xCAT/xCAT/Client.pm +++ b/perl-xCAT/xCAT/Client.pm @@ -906,8 +906,8 @@ sub populate_site_hash { ########################################## -# handle_response is a default callback that can be passed into submit_response() -# It is invoked repeatedly by submit_response() to print out the data returned by +# handle_response is a default callback that can be passed into submit_request() +# It is invoked repeatedly by submit_request() to print out the data returned by # the plugin. # # The normal flow is: diff --git a/perl-xCAT/xCAT/Schema.pm b/perl-xCAT/xCAT/Schema.pm index 819b3c3eb..c9922408e 100644 --- a/perl-xCAT/xCAT/Schema.pm +++ b/perl-xCAT/xCAT/Schema.pm @@ -919,8 +919,10 @@ site => { " the node deployment, node discovery and power operations. The default is to update.\n\n". " ntpservers: A comma delimited list of NTP servers for the cluster - often the\n". " xCAT management node.\n\n". - " runbootscripts: If set to 'yes' the scripts listed in the osimage and postscripts tables\n". - " postbootscripts attribute will be run at each reboot of the node.\n\n". + " runbootscripts: If set to 'yes' the scripts listed in the postbootscripts\n". + " attribute in the osimage and postscripts tables will be run during\n". + " each reboot of stateful (diskful) nodes. This attribute has no\n". + " effect on stateless and statelite nodes.\n\n". " syspowerinterval: For system p CECs, this is the number of seconds the rpower\n". " command will wait between performing the action for each CEC.\n". " For system x IPMI servers, this is the number of seconds the\n". diff --git a/perl-xCAT/xCAT/Utils.pm b/perl-xCAT/xCAT/Utils.pm index 8cc12b8db..1528881c5 100644 --- a/perl-xCAT/xCAT/Utils.pm +++ b/perl-xCAT/xCAT/Utils.pm @@ -964,16 +964,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 7de6bac5e..eaf7465a0 100755 --- a/xCAT-client/bin/genimage +++ b/xCAT-client/bin/genimage @@ -212,7 +212,7 @@ if ((!$imagename) && (!$os)){ chomp($os); } -print " OS: $os\n"; +if ($os) { print " OS: $os\n"; } @@ -282,7 +282,7 @@ if ((!$imagename) && (!$profile)){ } } } -print " Profile: $profile\n"; +if ($profile) { print " Profile: $profile\n"; } # get the interface if ((!$imagename) && (!$interface)){ @@ -311,7 +311,7 @@ if ((!$imagename) && (!$interface)){ } } } -print " Interface: $interface\n"; +if ($interface) { print " Interface: $interface\n"; }