From b8148e8e177b996faddfaf9286829a76421e4015 Mon Sep 17 00:00:00 2001 From: xq2005 Date: Tue, 30 Oct 2012 12:46:45 +0000 Subject: [PATCH] delete the tftpd error message when restarting xcatd on ubuntu git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14162 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/AAsn.pm | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index c596a3176..d7b05ead0 100644 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -1504,7 +1504,11 @@ sub enable_TFTPhpa if (-x "/usr/sbin/in.tftpd") { system("killall in.tftpd"); #xinetd can leave behind blocking tftp servers even if it won't start new ones if ($distro =~ /ubuntu.*/i){ - system("stop tftpd-hpa"); + sleep 1; + my @checkproc=`ps axf|grep -v grep|grep in.tftpd`; + if (@checkproc){ + system("stop tftpd-hpa"); + } } my @tftpprocs=`ps axf|grep -v grep|grep in.tftpd`; while (@tftpprocs) {