2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-03 10:07:36 +00:00

defect 4579: check the running of sshd at end of remoteshell, start it if needed

This commit is contained in:
WangXiaoPeng
2015-04-01 03:50:28 -04:00
parent 48ae224911
commit 9616e681a5

View File

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