Commit 8e532abb authored by Natanael Copa's avatar Natanael Copa

main/openrc: swap: only unmount tmpfs when shutting down

fixes #711
(cherry picked from commit 313b6883)
parent 9aed031b
......@@ -2,7 +2,7 @@
pkgname=openrc
pkgver=0.8.2
_ver=${pkgver/_git*/}
pkgrel=2
pkgrel=3
pkgdesc="OpenRC manages the services, startup and shutdown of a host"
url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git"
arch="all"
......@@ -17,6 +17,7 @@ source="http://distfiles.gentoo.org/distfiles/$pkgname-$_ver.tar.bz2
0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
remove-rc_sys-warning.patch
hwclock-hctosys.patch
swap-umount-tmpfs.patch
hostname.initd
hwdrivers.initd
......@@ -69,6 +70,7 @@ md5sums="a30f2e54f025b92fb40a0be5d464877d openrc-0.8.2.tar.bz2
fb8baeaf32f4d53491312675f28a9939 0001-fsck-add-C0-and-T-options-unless-fsck-is-busybox.patch
2a1749ee829877d80c3696eade59be8a remove-rc_sys-warning.patch
95927c85beb1476bda46ab8933c5e780 hwclock-hctosys.patch
ddb34ea87994df3126f5e6b7e8f9ac93 swap-umount-tmpfs.patch
c32e15b0858eef708497e7ee6355a055 hostname.initd
b1e64885f301166df30be3e3cf5338ff hwdrivers.initd
33ca3e558c42cdd17adccbc7807298f7 keymaps.initd
......
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;;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment