slitaz-boot-scripts diff etc/init.d/rc.functions @ rev 183

rc.functions/active_pidfile: fix weird pidfiles
author Pascal Bellard <pascal.bellard@slitaz.org>
date Fri Nov 27 16:52:24 2009 +0100 (2009-11-27)
parents 10b04a333b4d
children 106fc03e782e
line diff
     1.1 --- a/etc/init.d/rc.functions	Tue Mar 10 17:38:08 2009 +0000
     1.2 +++ b/etc/init.d/rc.functions	Fri Nov 27 16:52:24 2009 +0100
     1.3 @@ -32,7 +32,7 @@
     1.4  	if [ ! -e $1 ]; then
     1.5  		return 1
     1.6  	elif grep -qs "Name:.$(basename $2)$" \
     1.7 -			/proc/$(cat $1 | sed 's/[^0-9]//g')/status ; then
     1.8 +			/proc/$(sed 's/[^0-9]//g' < $1 | head -1)/status ; then
     1.9  		return 0
    1.10  	else
    1.11  		rm -f $1