diff --git a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm index bd36fe3df..3665c0b80 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm @@ -136,16 +136,27 @@ sub setup_CONS } elsif (! -e $ca_file2) { print "conserver cannot be started because the file $ca_file2 cannot be found\n"; } else { - my $cmd = "/etc/rc.d/init.d/conserver restart"; + my $cmd = "/etc/rc.d/init.d/conserver stop"; my @out = xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { # error - xCAT::MsgUtils->message("S", "Error starting Conserver"); - return 1; + xCAT::MsgUtils->message("S", "Error stopping conserver:".join("\n", @out)); } 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"; } + else { print "\nconserver stopped\n"; } + } + + $cmd = "/etc/rc.d/init.d/conserver start"; + @out = xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { # error + xCAT::MsgUtils->message("S", "Error starting conserver:".join("\n", @out)); + return 1; + } 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"; } } } } diff --git a/xCAT/postscripts/syslog b/xCAT/postscripts/syslog index 44c984822..0e1a36644 100755 --- a/xCAT/postscripts/syslog +++ b/xCAT/postscripts/syslog @@ -36,7 +36,7 @@ if [[ $OSTYPE = linux* ]]; then init="/etc/init.d/rsyslog" fi else - if [[ $$OSVER = sles* ]] || [[ $$OSVER = suse* ]] || [[ -f /etc/SuSE-release ]]; then + if [[ $OSVER = sles* ]] || [[ $OSVER = suse* ]] || [[ -f /etc/SuSE-release ]]; then #find out which syslog is used for SLES, syslog or syslog-ng result=`grep "^SYSLOG_DAEMON=" $sysconfig 2>&1` if [[ $result = *syslog-ng* ]]; then