diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-11 07:44:51 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-08-11 07:44:51 +0000 |
commit | 313b6883a2c955ea2797fb6b8632c126471463b7 (patch) | |
tree | 5c10db2c45000b17d57f6b25834fcc0066ec8f37 | |
parent | b74f8e91b88d5fd95d8dffbd63a73a5ac488a7fe (diff) | |
download | alpine_aports-313b6883a2c955ea2797fb6b8632c126471463b7.tar.bz2 alpine_aports-313b6883a2c955ea2797fb6b8632c126471463b7.tar.xz alpine_aports-313b6883a2c955ea2797fb6b8632c126471463b7.zip |
main/openrc: swap: only unmount tmpfs when shutting down
ref #711
-rw-r--r-- | main/openrc/APKBUILD | 4 | ||||
-rw-r--r-- | main/openrc/swap-umount-tmpfs.patch | 17 |
2 files changed, 20 insertions, 1 deletions
diff --git a/main/openrc/APKBUILD b/main/openrc/APKBUILD index ea51db3ae4..d02e751efc 100644 --- a/main/openrc/APKBUILD +++ b/main/openrc/APKBUILD | |||
@@ -2,7 +2,7 @@ | |||
2 | pkgname=openrc | 2 | pkgname=openrc |
3 | pkgver=0.8.3 | 3 | pkgver=0.8.3 |
4 | _ver=${pkgver/_git*/} | 4 | _ver=${pkgver/_git*/} |
5 | pkgrel=2 | 5 | pkgrel=3 |
6 | pkgdesc="OpenRC manages the services, startup and shutdown of a host" | 6 | pkgdesc="OpenRC manages the services, startup and shutdown of a host" |
7 | url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git" | 7 | url="http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git" |
8 | arch="all" | 8 | arch="all" |
@@ -18,6 +18,7 @@ source="http://distfiles.gentoo.org/distfiles/$pkgname-$_ver.tar.bz2 | |||
18 | 0001-sysctl-Use-dev-null-instead-of-q.patch | 18 | 0001-sysctl-Use-dev-null-instead-of-q.patch |
19 | remove-rc_sys-warning.patch | 19 | remove-rc_sys-warning.patch |
20 | hwclock-hctosys.patch | 20 | hwclock-hctosys.patch |
21 | swap-umount-tmpfs.patch | ||
21 | 22 | ||
22 | hostname.initd | 23 | hostname.initd |
23 | hwdrivers.initd | 24 | hwdrivers.initd |
@@ -71,6 +72,7 @@ fb8baeaf32f4d53491312675f28a9939 0001-fsck-add-C0-and-T-options-unless-fsck-is- | |||
71 | bc4f9ccd4036f9c458b89afe877fa8c2 0001-sysctl-Use-dev-null-instead-of-q.patch | 72 | bc4f9ccd4036f9c458b89afe877fa8c2 0001-sysctl-Use-dev-null-instead-of-q.patch |
72 | 2a1749ee829877d80c3696eade59be8a remove-rc_sys-warning.patch | 73 | 2a1749ee829877d80c3696eade59be8a remove-rc_sys-warning.patch |
73 | 95927c85beb1476bda46ab8933c5e780 hwclock-hctosys.patch | 74 | 95927c85beb1476bda46ab8933c5e780 hwclock-hctosys.patch |
75 | ddb34ea87994df3126f5e6b7e8f9ac93 swap-umount-tmpfs.patch | ||
74 | c32e15b0858eef708497e7ee6355a055 hostname.initd | 76 | c32e15b0858eef708497e7ee6355a055 hostname.initd |
75 | b1e64885f301166df30be3e3cf5338ff hwdrivers.initd | 77 | b1e64885f301166df30be3e3cf5338ff hwdrivers.initd |
76 | 33ca3e558c42cdd17adccbc7807298f7 keymaps.initd | 78 | 33ca3e558c42cdd17adccbc7807298f7 keymaps.initd |
diff --git a/main/openrc/swap-umount-tmpfs.patch b/main/openrc/swap-umount-tmpfs.patch new file mode 100644 index 0000000000..d68165c77a --- /dev/null +++ b/main/openrc/swap-umount-tmpfs.patch | |||
@@ -0,0 +1,17 @@ | |||
1 | diff --git a/init.d/swap.in b/init.d/swap.in | ||
2 | index fef8ab3..c540bc2 100644 | ||
3 | --- a/init.d/swap.in | ||
4 | +++ b/init.d/swap.in | ||
5 | @@ -24,8 +24,10 @@ stop() | ||
6 | |||
7 | # Try to unmount all tmpfs filesystems not in use, else a deadlock may | ||
8 | # occure. As $RC_SVCDIR may also be tmpfs we cd to it to lock it | ||
9 | - cd "$RC_SVCDIR" | ||
10 | - umount -a -t tmpfs 2>/dev/null | ||
11 | + if [ "$RC_RUNLEVEL" = "shutdown" ]; then | ||
12 | + cd "$RC_SVCDIR" | ||
13 | + umount -a -t tmpfs 2>/dev/null | ||
14 | + fi | ||
15 | |||
16 | case "$RC_UNAME" in | ||
17 | NetBSD|OpenBSD) swapctl -U -t noblk >/dev/null;; | ||