From bbd810425b819318fda48f390fec818c20bbff39 Mon Sep 17 00:00:00 2001 From: Roy Marples Date: Sun, 19 Apr 2009 11:15:37 +0000 Subject: Move special umount of tmpfs to the swap init script where it belongs, #149. --- init.d/swap.in | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'init.d/swap.in') diff --git a/init.d/swap.in b/init.d/swap.in index 6b2f7057..bad2b13b 100644 --- a/init.d/swap.in +++ b/init.d/swap.in @@ -21,6 +21,12 @@ start() stop() { ebegin "Deactivating swap devices" + + # Try to unmount all tmpfs filesystems not in use, else a deadlock may + # occure. As $RC_SVCDIR may also be tmpfs we cd to it to lock it + cd "${RC_SVCDIR}" + umount -a -t tmpfs 2>/dev/null + case "${RC_UNAME}" in NetBSD|OpenBSD) swapctl -U -t noblk >/dev/null;; *) swapoff -a >/dev/null;; -- cgit v1.2.3