summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJan Safranek <jsafrane@redhat.com>2009-12-22 09:23:42 +0100
committerJan Safranek <jsafrane@redhat.com>2009-12-22 09:23:42 +0100
commitff35955379053d1134cf020590c2e0cbdb76a946 (patch)
tree2287516a9ba2481a0debda5b7ed3a7a8af91618f
parentbbd42c7888fe7500bae0b01c03bff5bb8e314bf4 (diff)
downloadlibcg-ff35955379053d1134cf020590c2e0cbdb76a946.tar.gz
libcg-ff35955379053d1134cf020590c2e0cbdb76a946.tar.xz
libcg-ff35955379053d1134cf020590c2e0cbdb76a946.zip
Don't create sysdefault group whent it's not needed
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>
-rw-r--r--scripts/init.d/cgconfig.in10
1 files changed, 9 insertions, 1 deletions
diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in
index 13c16f8..cab9c03 100644
--- a/scripts/init.d/cgconfig.in
+++ b/scripts/init.d/cgconfig.in
@@ -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=$?