2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-22 03:32:04 +00:00

Do not show the error output when running killall command

close-issue: #2466
This commit is contained in:
chenglch 2017-02-08 16:14:56 +08:00
parent fc6755dbf0
commit c14a617afc

View File

@ -1298,7 +1298,7 @@ sub stop_TFTP
}
}
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
system("killall in.tftpd >/dev/null 2>&1"); #xinetd can leave behind blocking tftp servers even if it won't start new ones
if ($distro =~ /ubuntu.*/i || $distro =~ /debian.*/i) {
sleep 1;
my @checkproc = `ps axf|grep -v grep|grep in.tftpd`;
@ -1322,7 +1322,7 @@ sub stop_TFTP
if ($count == 5) {
my $tftpinfo = `ps axf|grep -v grep|grep in.tftpd`;
xCAT::MsgUtils->message("S", "ERROR: Can not stop tftp process $pid [$tftpinfo] in 5 seconds, stop it again.");
my $cmd = "killall -s KILL in.tftpd";
my $cmd = "killall -s KILL in.tftpd >/dev/null 2>&1";
system($cmd);
if($? != 0) {
xCAT::MsgUtils->message("S", "ERROR: Can not execute command $cmd.");