]> git.ipfire.org Git - thirdparty/libcgroup.git/commitdiff
scripts: cgconfig, cleanup
authorJiri Slaby <jslaby@suse.cz>
Wed, 12 Jan 2011 13:53:43 +0000 (14:53 +0100)
committerJan Safranek <jsafrane@redhat.com>
Mon, 28 Feb 2011 12:02:36 +0000 (13:02 +0100)
* get rid of some unneeded bashisms
* remove unused variables

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

index 0b3afd2917876354824a7e056e073112b33b6599..00a1c9bc3f03ae0e8dbcbbe1db52863004d8f04c 100644 (file)
 # get correct location of binaries from configure
 prefix=@prefix@;exec_prefix=@exec_prefix@;sbindir=@sbindir@
 CGCONFIGPARSER_BIN=$sbindir/cgconfigparser
-CGROUP_FS=cgroup
 CONFIG_FILE=/etc/cgconfig.conf
-
-# support multiple mount points
-declare -a MOUNTPOINT
-declare -a MOUNTOPTS
-maxindex=0
 servicename=cgconfig
 
 #
@@ -55,14 +49,12 @@ fi
 RETVAL=0
 
 create_default_groups() {
-        declare defaultcgroup
+       defaultcgroup=
 
-        if [ -f /etc/cgrules.conf ]
-        then
-            read user ctrl defaultcgroup <<< \
-               `grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf`
-            if [[ -n $defaultcgroup && $defaultcgroup = "*" ]]
-            then
+        if [ -f /etc/cgrules.conf ]; then
+           grep -m1 '^\*[[:space:]]\+' /etc/cgrules.conf | \
+                   read user ctrl defaultcgroup
+            if [ -n "$defaultcgroup" -a "$defaultcgroup" = "*" ]; then
                 log_warning_msg "/etc/cgrules.conf incorrect"
                 log_warning_msg "Overriding it"
                 defaultcgroup=
@@ -129,7 +121,7 @@ start() {
                 fi
         fi
 
-        if [ $CREATE_DEFAULT == "yes" ]; then
+        if [ $CREATE_DEFAULT = "yes" ]; then
                 create_default_groups
         fi