_find_processes(): in addition to the existing "interpreter: /path/to/daemon"
also recognize "interpreter: daemon" in ps(1) output. That case statement should be rewritten with expr(1) if more flexibility is needed. Fixes PR 35366 by Dominik Joe Pantucek, debugged with much assistance by him on IRC.
This commit is contained in:
parent
9715dfff81
commit
78b99d6807
@ -1,4 +1,4 @@
|
||||
# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $
|
||||
# $NetBSD: rc.subr,v 1.68 2007/01/27 14:30:26 hubertf Exp $
|
||||
#
|
||||
# Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
|
||||
# All rights reserved.
|
||||
@ -179,6 +179,7 @@ _find_processes()
|
||||
_psargs=$3
|
||||
|
||||
_pref=
|
||||
_procnamebn=${_procname##*/}
|
||||
if [ $_interpreter != "." ]; then # an interpreted script
|
||||
read _interp < ${_chroot:-}/$_procname # read interpreter name
|
||||
_interp=${_interp#\#!} # strip #!
|
||||
@ -190,9 +191,8 @@ _find_processes()
|
||||
_interpbn=${1##*/}
|
||||
_fp_args='_argv'
|
||||
_fp_match='case "$_argv" in
|
||||
${_interp}|"${_interp} "*|"${_interpbn}: ${_procname}"*)'
|
||||
${_interp}|"${_interp} "*|"${_interpbn}: "*${_procnamebn}*)'
|
||||
else # a normal daemon
|
||||
_procnamebn=${_procname##*/}
|
||||
_fp_args='_arg0 _argv'
|
||||
_fp_match='case "$_arg0" in
|
||||
$_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")'
|
||||
|
Loading…
Reference in New Issue
Block a user