diff --git a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm index d47b996e6..9457c5ef7 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/CONSsn.pm @@ -109,10 +109,12 @@ sub setup_CONS my $cmdref; $cmdref->{command}->[0] = "makeconservercf"; $cmdref->{cwd}->[0] = "/opt/xcat/sbin"; + $cmdref->{svboot}->[0] = "yes"; my $modname = "conserver"; ${"xCAT_plugin::" . $modname . "::"}{process_request} ->($cmdref, \&xCAT::Client::handle_response); + my $cmd = "chkconfig conserver on"; xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) @@ -121,8 +123,17 @@ sub setup_CONS return 1; } + # stop conserver + my $cmd = "/etc/rc.d/init.d/conserver stop"; + xCAT::Utils->runcmd($cmd, 0); + if ($::RUNCMD_RC != 0) + { # error + xCAT::MsgUtils->message("S", "Error stoping Conserver"); + } + + # start conserver - my $cmd = "/etc/rc.d/init.d/conserver start"; + $cmd = "/etc/rc.d/init.d/conserver start"; xCAT::Utils->runcmd($cmd, 0); if ($::RUNCMD_RC != 0) { # error diff --git a/xCAT-server-2.0/lib/xcat/plugins/conserver.pm b/xCAT-server-2.0/lib/xcat/plugins/conserver.pm index 660322360..adfb50b5c 100644 --- a/xCAT-server-2.0/lib/xcat/plugins/conserver.pm +++ b/xCAT-server-2.0/lib/xcat/plugins/conserver.pm @@ -35,7 +35,7 @@ sub preprocess_request { if ($request->{_xcatdest}) { return [$request]; } #exit if preprocessed my $callback=shift; my @requests; - my $noderange = $request->{node}; #Should be arrayref + my $noderange = $request->{node}; #Should be arrayref #display usage statement if -h my $extrargs = $request->{arg}; @@ -195,6 +195,8 @@ sub makeconservercf { %termservers = (); #clear hash of existing entries my $cb = shift; my $nodes = $req->{node}; + my $svboot=0; + if (exists($req->{svboot})) { $svboot=1;} my $cfile; my @filecontent; open $cfile,'/etc/conserver.cf'; @@ -286,11 +288,14 @@ sub makeconservercf { } close $cfile; - #restart conserver daemon - my $cmd = "/etc/rc.d/init.d/conserver stop"; - xCAT::Utils->runcmd($cmd, -1); - $cmd = "/etc/rc.d/init.d/conserver start"; - xCAT::Utils->runcmd($cmd, -1); + + if (!$svboot) { + #restart conserver daemon + my $cmd = "/etc/rc.d/init.d/conserver stop"; + xCAT::Utils->runcmd($cmd, -1); + $cmd = "/etc/rc.d/init.d/conserver start"; + xCAT::Utils->runcmd($cmd, -1); + } } sub dotsent { diff --git a/xCAT-server-2.0/sbin/copycerts b/xCAT-server-2.0/sbin/copycerts index 4c6dd0a89..5f5195839 100644 --- a/xCAT-server-2.0/sbin/copycerts +++ b/xCAT-server-2.0/sbin/copycerts @@ -133,7 +133,7 @@ sub copyCertstoSN } # TODO fix for SuSE and AIX - `service xcatd restart`; +# `service xcatd restart`; return $rc; }