From fb510583ead753a8beb2da9ca890db4409d7657b Mon Sep 17 00:00:00 2001 From: daniceexi Date: Fri, 30 Dec 2011 07:36:58 +0000 Subject: [PATCH] defect 3467275: try to kill atftpd first before configuring the xinetd for tftp git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@11317 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/AAsn.pm | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/AAsn.pm b/xCAT-server/lib/xcat/plugins/AAsn.pm index ffb02a09e..e26df1a88 100644 --- a/xCAT-server/lib/xcat/plugins/AAsn.pm +++ b/xCAT-server/lib/xcat/plugins/AAsn.pm @@ -1335,6 +1335,14 @@ sub enable_TFTPhpa return 1; } + # kill the process of atftp if it's there + my @output = xCAT::Utils->runcmd("ps -ef | grep atftpd | grep -v grep", -1); + foreach my $ps (@output) { + $ps =~ s/^\s+//; # strip any leading spaces + my ($uid, $pid, $ppid, $desc) = split /\s+/, $ps; + system("kill -9 $pid >/dev/null 2>&1"); + } + # read tftpdir directory from database my $tftpdir = xCAT::Utils->getTftpDir(); if (!(-e $tftpdir)) {