blob: 5d19293f059b4cdb42315e87ae6c8bf857e05ea8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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
|