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
This commit is contained in:
daniceexi 2011-12-30 07:36:58 +00:00
parent 3274a805f0
commit fb510583ea

View File

@ -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)) {