* get rid of some unneeded bashisms
* remove unused variables

Signed-off-by: Jiri Slaby <jsl...@suse.cz>
---
 scripts/init.d/cgconfig.in |   20 ++++++--------------
 1 files changed, 6 insertions(+), 14 deletions(-)

diff --git a/scripts/init.d/cgconfig.in b/scripts/init.d/cgconfig.in
index 0b3afd2..00a1c9b 100644
--- a/scripts/init.d/cgconfig.in
+++ b/scripts/init.d/cgconfig.in
@@ -32,13 +32,7 @@
 # get correct location of binaries from configure
 pref...@prefix@;exec_pref...@exec_prefix@;sbind...@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
 
-- 
1.7.3.4



------------------------------------------------------------------------------
Protect Your Site and Customers from Malware Attacks
Learn about various malware tactics and how to avoid them. Understand 
malware threats, the impact they can have on your business, and how you 
can protect your company and customers by using code signing.
http://p.sf.net/sfu/oracle-sfdevnl
_______________________________________________
Libcg-devel mailing list
Libcg-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libcg-devel

Reply via email to