From 751d17bcdb7306f46179b403cfafc88c39bf3b25 Mon Sep 17 00:00:00 2001 From: Natanael Copa Date: Wed, 17 Aug 2016 17:15:25 +0200 Subject: [PATCH 4/7] swap: only unmount tmpfs when shutting down http://bugs.alpinelinux.org/issues/711 --- init.d/swap.in | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/init.d/swap.in b/init.d/swap.in index 4fb2b35..093d19f 100644 --- a/init.d/swap.in +++ b/init.d/swap.in @@ -32,8 +32,10 @@ stop() # Try to unmount all tmpfs filesystems not in use, else a deadlock may # occur. As $RC_SVCDIR may also be tmpfs we cd to it to lock it - cd "$RC_SVCDIR" - umount -a -t tmpfs 2>/dev/null + if [ "$RC_RUNLEVEL" = "shutdown" ]; then + cd "$RC_SVCDIR" + umount -a -t tmpfs 2>/dev/null + fi case "$RC_UNAME" in NetBSD|OpenBSD) swapctl -U -t noblk >/dev/null;; -- 2.9.3