mirror of
https://github.com/xcat2/xcat-core.git
synced 2026-09-04 20:17:55 +00:00
fix(remoteshell): give the kill option its hyphen
The fallback that runs when the restart of the ssh service fails collects the process ids of the daemon and kills them. The option is missing its hyphen, so the shell reads the signal number as one more process id. The daemons then get the default signal, which a process can catch, and the shell also signals the process with id 9. The next line of the same fallback already uses the correct form.
This commit is contained in:
@@ -648,7 +648,7 @@ fi
|
||||
#try to kill the process and start
|
||||
if [ "$?" != "0" ];then
|
||||
PIDLIST=`ps aux | grep -v grep | grep "/usr/sbin/sshd"|awk -F" " '{print $2}'|xargs`
|
||||
[ -n "$PIDLIST" ] && kill 9 $PIDLIST
|
||||
[ -n "$PIDLIST" ] && kill -9 $PIDLIST
|
||||
/usr/sbin/sshd
|
||||
fi
|
||||
kill -9 $CREDPID
|
||||
|
||||
Reference in New Issue
Block a user