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

glen glen at pld-linux.org
Thu Nov 19 21:41:55 CET 2009


Author: glen
Date: Thu Nov 19 21:41:54 2009
New Revision: 10982

Modified:
   rc-scripts/trunk/rc.d/init.d/functions
Log:
- if pidfile specified, pid must be there, don't fallback for pidof(1)

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 19 21:41:54 2009
@@ -830,8 +830,8 @@
 	fi
 
 	# if pidfile specified, pid must be there
-	if [ "$pidfile" -a -f "$pidfile" ]; then
-		read pid < $pidfile
+	if [ "$pidfile" ]; then
+		[ -f "$pidfile" ] && read pid < $pidfile
 	else
 		pid=$(pidof -o $$ -o $PPID -o %PPID -x $daemon)
 	fi


More information about the pld-cvs-commit mailing list