mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2026-02-21 15:51:34 +01:00
18 lines
512 B
Diff
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;;
|