slitaz-boot-scripts 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 | ddd1db038d3b |
children | 4e41551aaa7c |
files | etc/init.d/rc.functions |
line diff
1.1 --- a/etc/init.d/rc.functions Mon Nov 09 21:16:17 2009 +0100 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