Bug #1804

Patch for /etc/rc.subr

Added by michaelneuma about 4 years ago. Updated almost 4 years ago.

Status:ClosedStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:-
Target version:-

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'

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

History

#1 Updated by alexh almost 4 years ago

this is committed.

Also available in: Atom PDF