Andy Hilker
2005-Aug-12 10:49 UTC
rc-ng problem with [procname] (e.g. kernel threaded procs)
Hi,
i think I have found a problem with rc-ng scripts and procnames
including brackets (e.g. kernel threaded, like mysqld).
Brackets [] are ignored, process will not be found and is regarded
as "not running". This breaks stop+status functions of rcng. The
following patch allows brackets in variable procname rc-ng scripts.
Maybe someone can review and fix this issue.
It was relevant for me when using [mysqld].
bye,
Andy
# $FreeBSD: src/etc/rc.subr,v 1.31.2.1 2005/01/17 11:51:00 keramida Exp $
--- rc.subr Thu Aug 11 15:18:52 2005
+++ /etc/rc.subr Thu Aug 11 15:14:06 2005
@@ -267,7 +267,7 @@
_procnamebn=${_procname##*/}
_fp_args='_arg0 _argv'
_fp_match='case "$_arg0" in
-
$_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")'
+
"$_procname"|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")'
fi
_proccheck='
Andy Hilker
2005-Aug-16 17:31 UTC
rc-ng problem with [procname] (e.g. kernel threaded procs)
Hmh, no one interested in this issue? Or am i wrong with this issue? You (Andy Hilker) wrote:> Hi, > > i think I have found a problem with rc-ng scripts and procnames > including brackets (e.g. kernel threaded, like mysqld). > > Brackets [] are ignored, process will not be found and is regarded > as "not running". This breaks stop+status functions of rcng. The > following patch allows brackets in variable procname rc-ng scripts. > Maybe someone can review and fix this issue. > > It was relevant for me when using [mysqld]. > > bye, > Andy > > > # $FreeBSD: src/etc/rc.subr,v 1.31.2.1 2005/01/17 11:51:00 keramida Exp $ > --- rc.subr Thu Aug 11 15:18:52 2005 > +++ /etc/rc.subr Thu Aug 11 15:14:06 2005 > @@ -267,7 +267,7 @@ > _procnamebn=${_procname##*/} > _fp_args='_arg0 _argv' > _fp_match='case "$_arg0" in > - $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")' > + "$_procname"|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")' > fi > > _proccheck=' >