Bug #1804
closedPatch for /etc/rc.subr
0%
Description
Hi,
below is a patch that allows correct behaviour of the use of
command_interpreter in rc.d
scripts in some cases where the proctitle of ps doesn't include the full
interpreter path,
but for example just "perl: ..." (instead of "/usr/pkg/bin/perl -flags
...").
I tried to use the mail/postgrey greylisting server, but the
/etc/rc.d/postgrey stop/status
didn't worked due to that. With this patch, it works!
Regards,
Michael
root@kvmdragon:~# diff u /usr/src/etc/rc.subr /etc/rc.subr /usr/src/etc/rc.subr 2010-08-11 16:44:59 0200
--
++ /etc/rc.subr 2010-08-15 13:05:37 0200@ -359,9 +359,10
@
warn "\$command_interpreter $_interpreter != $1"
fi
_interp="$* $_procname" # cleanup spaces, add _procname
_interpbn="$1" # the interpreter binary
_fp_args='_argv'
_fp_match='case "$_argv" in
- ${_interp}|"${_interp} "*)'
+ "${_interpbn##*/}: "$_procname*|${_interp}|"${_interp} "*)'
else # a normal daemon
_procnamebn=${_procname##*/}
_fp_args='_arg0 _argv'
Files