From 7f069d3f481bd9ab948e61f67014de122ba173ca Mon Sep 17 00:00:00 2001 From: chenglch Date: Tue, 7 Feb 2017 16:50:34 +0800 Subject: [PATCH] Do not stop tftp service in xcatd when restarting xcad service close-issue: #2463 --- xCAT-server/sbin/xcatd | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/sbin/xcatd b/xCAT-server/sbin/xcatd index 3ec258f16..4b21cd981 100755 --- a/xCAT-server/sbin/xcatd +++ b/xCAT-server/sbin/xcatd @@ -139,6 +139,7 @@ Getopt::Long::Configure("pass_through"); use Storable qw(dclone); use POSIX qw(WNOHANG setsid :errno_h); my $pidfile; +my $reload; my $foreground; GetOptions( 'pidfile|p=s' => \$pidfile, @@ -1278,6 +1279,7 @@ $SIG{USR2} = sub { if ($listener) { unlink("/var/run/xcat/mainservice.pid"); close($listener); $quit = 1; $listener = 0; $udpctl = 0; + $reload = 1; xCAT::MsgUtils->message("S", "xcatd main service $$ quiescing"); } }; @@ -1552,7 +1554,9 @@ if ($dbmaster) { # stop the monitoring process xCAT_monitoring::monitorctrl::stop($$); -stop_tftp_service(); +if (! $reload) { + stop_tftp_service(); +} sub stop_tftp_service { eval {