aboutsummaryrefslogtreecommitdiffstats
path: root/main/openrc/0004-swap-only-unmount-tmpfs-when-shutting-down.patch
diff options
context:
space:
mode:
Diffstat (limited to 'main/openrc/0004-swap-only-unmount-tmpfs-when-shutting-down.patch')
-rw-r--r--main/openrc/0004-swap-only-unmount-tmpfs-when-shutting-down.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/main/openrc/0004-swap-only-unmount-tmpfs-when-shutting-down.patch b/main/openrc/0004-swap-only-unmount-tmpfs-when-shutting-down.patch
new file mode 100644
index 0000000000..5d19293f05
--- /dev/null
+++ b/main/openrc/0004-swap-only-unmount-tmpfs-when-shutting-down.patch
@@ -0,0 +1,30 @@
+From 751d17bcdb7306f46179b403cfafc88c39bf3b25 Mon Sep 17 00:00:00 2001
+From: Natanael Copa <ncopa@alpinelinux.org>
+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
+