defect 4579: check the running of sshd at end of remoteshell, start it if needed
This commit is contained in:
parent
48ae224911
commit
9616e681a5
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user