mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-07-11 23:31:30 +00:00
defect 4579: check the running of sshd at end of remoteshell, start it if needed
This commit is contained in:
@ -469,4 +469,14 @@ else
|
||||
restartservice sshd
|
||||
fi
|
||||
|
||||
# check whether the sshd daemon has been started successfully
|
||||
# As we known that for rh7 the sshd cannot be started by systemctl in chroot mode
|
||||
ps aux | grep -v grep | grep sshd
|
||||
|
||||
if [ $? -ne 0 ]; then
|
||||
if [ -e "/usr/sbin/sshd" ]; then
|
||||
/usr/sbin/sshd
|
||||
fi
|
||||
fi
|
||||
|
||||
kill -9 $CREDPID
|
||||
|
Reference in New Issue
Block a user