From d6baf0c11b1c61711d6bef1a69e094c8c7184426 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Beno=C3=AEt=20S=C3=89RIE?= Date: Thu, 30 Jan 2014 15:49:02 +0100 Subject: [PATCH] Added sleep 0.2 before umounting /dev when stopping service. --- install/etc/init.d/evobackup | 4 +++- install/etc/init/evobackup.conf | 2 ++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/install/etc/init.d/evobackup b/install/etc/init.d/evobackup index 0a895b2..c7e373f 100755 --- a/install/etc/init.d/evobackup +++ b/install/etc/init.d/evobackup @@ -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 ;; diff --git a/install/etc/init/evobackup.conf b/install/etc/init/evobackup.conf index 24bd755..ab66e11 100644 --- a/install/etc/init/evobackup.conf +++ b/install/etc/init/evobackup.conf @@ -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 \ No newline at end of file