]> git.pld-linux.org Git - projects/rc-scripts.git/commitdiff
- drop redhat/mandrake compat
authorElan Ruusamäe <glen@pld-linux.org>
Thu, 1 Nov 2007 01:13:41 +0000 (01:13 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Thu, 1 Nov 2007 01:13:41 +0000 (01:13 +0000)
- simple if should be lighter than function call

svn-id: @8929

rc.d/init.d/functions

index 94d7e2ccebffd70e868c01e5b27401be4d96ff8a..4e2a98a76dad897c199b9d847e2fe62398f04231 100644 (file)
@@ -743,9 +743,9 @@ status()
        pid=$(pidof -o $$ -o $PPID -o %PPID -x $daemon)
        pid=$(filter_chroot "$pid")
 
-       if [ "$pid" != "" ]; then
+       if [ "$pid" ]; then
                cpuset_msg="..."
-               if is_yes "$CPUSETS" && [ -n "$SERVICE_CPUSET" ]; then
+               if [ -n "$SERVICE_CPUSET" ] && is_yes "$CPUSETS" ]; then
                        if $(grep -q "$pid" "/dev/cpuset/${SERVICE_CPUSET}/tasks"); then
                                cpuset_msg=$(nls " in cpuset %s..." "$SERVICE_CPUSET")
                        else
@@ -761,7 +761,7 @@ status()
 #                      ((prog ":") == $5)) { print $1 ; exit 0 } }' $1)
 #              if [ "$pid" != "" ]; then
 #                      cpuset_msg="..."
-#                      if is_yes "$CPUSETS" && [ -n "$SERVICE_CPUSET" ]; then
+#                      if [ -n "$SERVICE_CPUSET" ] && is_yes "$CPUSETS" ]; then
 #                              if $(grep -q "$pid" "/dev/cpuset/${SERVICE_CPUSET}/tasks"); then
 #                                      cpuset_msg=$(nls " in cpuset %s..." "$SERVICE_CPUSET")
 #                              else
@@ -887,11 +887,6 @@ log_failed ()
        initlog -n $0 -s "$1 $2" -e 2
 }
 
-# RedHat/Mandrake specific functions
-action () { STRING=$1; shift; run_cmd "$STRING" "$*"; }
-success () { return 0; }
-failure () { return 1; }
-
 disable_selinux() {
        typeset _d selinuxfs _t _r
 
This page took 0.314395 seconds and 4 git commands to generate.