Project

General

Profile

Actions

Bug #1804

closed

Patch for /etc/rc.subr

Added by michaelneuma over 14 years ago. Updated about 14 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

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

unnamed (1.44 KB) unnamed michaelneuma, 08/15/2010 11:16 AM
Actions

Also available in: Atom PDF