Added sleep 0.2 before umounting /dev when stopping service.

This commit is contained in:
Benoît S. 2014-01-30 15:49:02 +01:00
parent ee525abd4c
commit d6baf0c11b
2 changed files with 5 additions and 1 deletions

View file

@ -24,10 +24,12 @@ case "$1" in
stop)
for jail in ${BACKUP_PATH}/jails/*; do
kill $(chroot $jail cat /var/run/sshd.pid)
umount ${jail}/proc/
umount ${jail}/dev/pts/
# Need to wait a little time before unmounting /dev
sleep 0.2
umount ${jail}/dev
kill $(chroot $jail cat /var/run/sshd.pid)
done
;;

View file

@ -22,6 +22,8 @@ post-stop script
kill $(chroot $jail cat /var/run/sshd.pid)
umount ${jail}/proc
umount ${jail}/dev/pts
# Need to wait a little time before unmounting /dev
sleep 0.2
umount ${jail}/dev
done
end script