The bootscript function pidofproc is broken when passing a specific
pidfile with -p. The problem is that there's an integer expression
using -ge, but the tested argument may be null. Here's the boiled down
test case:
# /bin/sh -c ". /etc/rc.d/init.d/functions && pidofproc -p
/var/run/syslogd.pid syslogd"
/etc/rc.d/init.d/functions: line 375: [: : integer expression expected
Attached is a patch to fix this. The first part is relevant, the
second part is the normal path when no -p is passed to pidofproc. I
just stripped out an unnecessary Bourne shellism there.
--
Dan
Index: bootscripts/lfs/init.d/functions
===================================================================
--- bootscripts/lfs/init.d/functions (revision 7961)
+++ bootscripts/lfs/init.d/functions (working copy)
@@ -377,7 +377,7 @@
pidlist="${pidlist} ${pid}"
fi
- if [ "${silent}" -ne "1" ]; then
+ if [ "${silent}" != "1" ]; then
echo "${pidlist}"
fi
@@ -390,7 +390,7 @@
else
pidlist=`pidof -o $$ -o $PPID -x "$1"`
- if [ "x${silent}" != "x1" ]; then
+ if [ "${silent}" != "1" ]; then
echo "${pidlist}"
fi
--
http://linuxfromscratch.org/mailman/listinfo/lfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page