]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- don't mount cgroup if it's set up in fstab
authorJan Rękorajski <baggins@pld-linux.org>
Thu, 25 Nov 2010 23:54:57 +0000 (23:54 +0000)
committerJan Rękorajski <baggins@pld-linux.org>
Thu, 25 Nov 2010 23:54:57 +0000 (23:54 +0000)
  http://lists.pld-linux.org/mailman/pipermail/pld-devel-pl/2010-November/152970.html
  BTW, all this kinda sucks and needs revamp :(

svn-id: @11913

rc.d/rc.sysinit

index 0d8b5d1b38b1d24a2c50e1cdbfe674b7d6b26ff5..f977f4321f927a972e7754eef6e450245960d5eb 100755 (executable)
@@ -272,13 +272,17 @@ if ! is_yes "$VSERVER"; then
 
        # cgroup/cpuset support
        if grep -q cgroup /proc/filesystems 2>/dev/null ; then
-               # creating is more convenient than artificial conflict with older udev
-               mkdir -p /dev/cgroup
-               # mount w/o options enables all available cgroup subsystems
-               modprobe -s blk-cgroup 2> /dev/null
-               mount -n -t cgroup none /dev/cgroup
+               if ! grep -q cgroup /etc/fstab 2>/dev/null ; then
+                       # creating is more convenient than artificial conflict with older udev
+                       mkdir -p /dev/cgroup
+                       # mount w/o options enables all available cgroup subsystems
+                       modprobe -s blk-cgroup 2> /dev/null
+                       mount -n -t cgroup none /dev/cgroup
+               fi
        elif grep -q cpuset /proc/filesystems 2>/dev/null ; then
-               mount -n -t cpuset none /dev/cpuset
+               if ! grep -q cpuset /etc/fstab 2>/dev/null ; then
+                       mount -n -t cpuset none /dev/cpuset
+               fi
        fi
 
        # Configure Linux kernel (initial configuration, some required modules still
This page took 0.066067 seconds and 4 git commands to generate.