aports/main/openrc/swap-umount-tmpfs.patch
2012-09-19 13:33:29 +00:00

18 lines
512 B
Diff

diff --git a/init.d/swap.in b/init.d/swap.in
index fa08b4d..e358266 100644
--- a/init.d/swap.in
+++ b/init.d/swap.in
@@ -25,8 +25,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;;