Don't mount the ns subsystem.
authorDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 25 Feb 2010 22:37:52 +0000 (22:37 +0000)
committerDaniel Hokka Zakrisson <daniel@hozac.com>
Thu, 25 Feb 2010 22:37:52 +0000 (22:37 +0000)
git-svn-id: http://svn.linux-vserver.org/svn/util-vserver/trunk@2882 94cd875c-1c1d-0410-91d2-eb244daf1a30

scripts/vserver.functions

index ed487fa..b014abf 100644 (file)
@@ -1443,6 +1443,10 @@ function _generateCgroupOptions
     findFile file "$__CONFDIR/.defaults/cgroup/subsys" ""
     if test -n "$file"; then
        read CGROUP_SUBSYS < "$file"
+    elif $_GREP -q '^ns[[:space:]]' /proc/cgroups; then
+       # Hack for the ns subsystem, with which we are incompatible
+       CGROUP_SUBSYS=$($_SED '/^#/d;/^ns[[:space:]]/d;s/[[:space:]].*//' /proc/cgroups | \
+                       (s=""; while read x; do test -n "$s" && s="$s,"; s="$s$x"; done; echo "$s"))
     fi
     findFile file "$__CONFDIR/.defaults/cgroup/inherit" ""
     if test -n "$file"; then