]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
Don't create sysdefault group whent it's not needed
authorJan Safranek <jsafrane@redhat.com>
Tue, 22 Dec 2009 08:23:42 +0000 (09:23 +0100)
committerJan Safranek <jsafrane@redhat.com>
Tue, 22 Dec 2009 08:23:42 +0000 (09:23 +0100)
IMHO most of users don't need sysdefault group being created during boot -
it's quite slow and at least in Fedora there is no application using it.

So, let users to configure it and allow them to turn the sysdefault off.

Whether the option should be enabled/disabled is distro-specific, we as
libcgroup turn it on.

Changelog:
 - create the sysdefault group by default

Signed-off-by: Jan Safranek <jsafrane@redhat.com>
scripts/init.d/cgconfig.in

index 13c16f877954c7c1b270835067fae4f5f114a8e7..cab9c03b04d524af5cd480172fb31ddae58d1853 100644 (file)
@@ -48,6 +48,12 @@ servicename=cgconfig
 #
 . /lib/lsb/init-functions
 
+# read the config
+CREATE_DEFAULT=yes
+if [ -e /etc/sysconfig/cgconfig ]; then
+        . /etc/sysconfig/cgconfig
+fi
+
 parse_mounts() {
     while read name mountpt fs opts other
     do
@@ -140,7 +146,9 @@ start() {
                 fi
         fi
 
-       create_default_groups
+        if [ $CREATE_DEFAULT == "yes" ]; then
+                create_default_groups
+        fi
 
         touch /var/lock/subsys/$servicename
         retval=$?