From 7dab6367e6682e9ec72565b8bc44ce4d7964a426 Mon Sep 17 00:00:00 2001 From: bp-sawyers Date: Wed, 21 May 2008 21:33:50 +0000 Subject: [PATCH] show output of conserver service cmd git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@1473 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm index 3d298e26a..bd36fe3df 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm @@ -13,16 +13,16 @@ use Getopt::Long; #------------------------------------------------------- -=head1 +=head1 xCAT plugin package to setup conserver #------------------------------------------------------- -=head3 handled_commands +=head3 handled_commands Check to see if on a Service Node -Check database to see if this node is going to have Conserver setup +Check database to see if this node is going to have Conserver setup should be always Call setup_CONS @@ -72,7 +72,7 @@ sub handled_commands #------------------------------------------------------- -=head3 process_request +=head3 process_request Process the command @@ -86,9 +86,9 @@ sub process_request #----------------------------------------------------------------------------- -=head3 setup_CONS +=head3 setup_CONS - Sets up Conserver + Sets up Conserver =cut @@ -137,13 +137,15 @@ sub setup_CONS print "conserver cannot be started because the file $ca_file2 cannot be found\n"; } else { my $cmd = "/etc/rc.d/init.d/conserver restart"; - xCAT::Utils->runcmd($cmd, 0); + my @out = xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { # error xCAT::MsgUtils->message("S", "Error starting Conserver"); return 1; - } else { - print "\nconserver started\n"; + } else { # Zero rc, but with the service cmds that does not mean they succeeded + my $output = join("\n", @out); + if (length($output)) { print "\n$output\n"; } + else { print "\nconserver started\n"; } } } }