summaryrefslogtreecommitdiffstats
path: root/main/openrc/swap-umount-tmpfs.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2011-08-11 07:44:51 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2011-08-11 07:44:51 +0000
commit313b6883a2c955ea2797fb6b8632c126471463b7 (patch)
tree5c10db2c45000b17d57f6b25834fcc0066ec8f37 /main/openrc/swap-umount-tmpfs.patch
parentb74f8e91b88d5fd95d8dffbd63a73a5ac488a7fe (diff)
downloadaports-313b6883a2c955ea2797fb6b8632c126471463b7.tar.bz2
aports-313b6883a2c955ea2797fb6b8632c126471463b7.tar.xz
main/openrc: swap: only unmount tmpfs when shutting down
ref #711
Diffstat (limited to 'main/openrc/swap-umount-tmpfs.patch')
-rw-r--r--main/openrc/swap-umount-tmpfs.patch17
1 files changed, 17 insertions, 0 deletions
diff --git a/main/openrc/swap-umount-tmpfs.patch b/main/openrc/swap-umount-tmpfs.patch
new file mode 100644
index 000000000..d68165c77
--- /dev/null
+++ b/main/openrc/swap-umount-tmpfs.patch
@@ -0,0 +1,17 @@
+diff --git a/init.d/swap.in b/init.d/swap.in
+index fef8ab3..c540bc2 100644
+--- a/init.d/swap.in
++++ b/init.d/swap.in
+@@ -24,8 +24,10 @@ stop()
+
+ # 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
++ 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;;