SVN: rc-scripts/trunk/rc.d/init.d/functions

glen glen at pld-linux.org
Thu Nov 1 02:13:41 CET 2007


Author: glen
Date: Thu Nov  1 02:13:41 2007
New Revision: 8929

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
- drop redhat/mandrake compat
- simple if should be lighter than function call

Modified: rc-scripts/trunk/rc.d/init.d/functions
==============================================================================
--- rc-scripts/trunk/rc.d/init.d/functions	(original)
+++ rc-scripts/trunk/rc.d/init.d/functions	Thu Nov  1 02:13:41 2007
@@ -743,9 +743,9 @@
 	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 @@
 #			((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 @@
 	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
 


More information about the pld-cvs-commit mailing list