1 |
commit: d8a5d35760a4a1acaf74d1bcbbe76b2b566196d5 |
2 |
Author: William Hubbs <williamh <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 26 17:02:00 2012 +0000 |
4 |
Commit: William Hubbs <williamh <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Jan 30 16:12:08 2012 +0000 |
6 |
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/openrc.git;a=commit;h=d8a5d357 |
7 |
|
8 |
cgroups: make sure /sys/fs/cgroup is a mount point |
9 |
|
10 |
We need to make sure this directory is a mount point before we add the |
11 |
control groups. |
12 |
|
13 |
Reported-by: Andrej Filipcic <andrej.filipcic <AT> ijs.si> |
14 |
X-Gentoo-Bug: 400903 |
15 |
X-Gentoo-Bug-URL: https://bugs.gentoo.org/show_bug.cgi?id=400903 |
16 |
|
17 |
--- |
18 |
init.d/sysfs.in | 6 ++---- |
19 |
1 files changed, 2 insertions(+), 4 deletions(-) |
20 |
|
21 |
diff --git a/init.d/sysfs.in b/init.d/sysfs.in |
22 |
index 68a71c6..3736d1f 100644 |
23 |
--- a/init.d/sysfs.in |
24 |
+++ b/init.d/sysfs.in |
25 |
@@ -74,10 +74,8 @@ mount_misc() |
26 |
|
27 |
mount_cgroups() |
28 |
{ |
29 |
- yesno ${rc_cgroups:-YES} || return 0 |
30 |
- if [ ! -e /proc/cgroups ]; then |
31 |
- return 0 |
32 |
- fi |
33 |
+ yesno ${rc_cgroups:-YES} && [ -e /proc/cgroups ] && \ |
34 |
+ mountinfo -q /sys/fs/cgroup || return 0 |
35 |
|
36 |
while read name hier groups enabled rest; do |
37 |
case "${enabled}" in |