| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: rc.subr,v 1.9 2008/12/21 00:03:32 adrianp Exp $ | | 1 | # $NetBSD: rc.subr,v 1.10 2009/01/18 22:35:35 shattered Exp $ |
2 | # | | 2 | # |
3 | # Copyright (c) 1997-2002 The NetBSD Foundation, Inc. | | 3 | # Copyright (c) 1997-2002 The NetBSD Foundation, Inc. |
4 | # All rights reserved. | | 4 | # All rights reserved. |
5 | # | | 5 | # |
6 | # This code is derived from software contributed to The NetBSD Foundation | | 6 | # This code is derived from software contributed to The NetBSD Foundation |
7 | # by Luke Mewburn. | | 7 | # by Luke Mewburn. |
8 | # | | 8 | # |
9 | # Redistribution and use in source and binary forms, with or without | | 9 | # Redistribution and use in source and binary forms, with or without |
10 | # modification, are permitted provided that the following conditions | | 10 | # modification, are permitted provided that the following conditions |
11 | # are met: | | 11 | # are met: |
12 | # 1. Redistributions of source code must retain the above copyright | | 12 | # 1. Redistributions of source code must retain the above copyright |
13 | # notice, this list of conditions and the following disclaimer. | | 13 | # notice, this list of conditions and the following disclaimer. |
14 | # 2. Redistributions in binary form must reproduce the above copyright | | 14 | # 2. Redistributions in binary form must reproduce the above copyright |
| @@ -266,27 +266,27 @@ _find_processes() | | | @@ -266,27 +266,27 @@ _find_processes() |
266 | _interp=${_interp#\#!} # strip #! | | 266 | _interp=${_interp#\#!} # strip #! |
267 | set -- $_interp | | 267 | set -- $_interp |
268 | if [ $_interpreter != $1 ]; then | | 268 | if [ $_interpreter != $1 ]; then |
269 | warn "\$command_interpreter $_interpreter != $1" | | 269 | warn "\$command_interpreter $_interpreter != $1" |
270 | fi | | 270 | fi |
271 | _interp="$* $_procname" # cleanup spaces, add _procname | | 271 | _interp="$* $_procname" # cleanup spaces, add _procname |
272 | _fp_args='_argv' | | 272 | _fp_args='_argv' |
273 | _fp_match='case "$_argv" in | | 273 | _fp_match='case "$_argv" in |
274 | ${_interp}|"${_interp} "*)' | | 274 | ${_interp}|"${_interp} "*)' |
275 | else # a normal daemon | | 275 | else # a normal daemon |
276 | _procnamebn=${_procname##*/} | | 276 | _procnamebn=${_procname##*/} |
277 | _fp_args='_arg0 _argv' | | 277 | _fp_args='_arg0 _argv' |
278 | _fp_match='case "$_arg0" in | | 278 | _fp_match='case "$_arg0" in |
279 | $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})")' | | 279 | $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")' |
280 | fi | | 280 | fi |
281 | | | 281 | |
282 | _proccheck=' | | 282 | _proccheck=' |
283 | ${_RCCMD_ps} ${_RCARG_psformat} '"$_psargs"' | | | 283 | ${_RCCMD_ps} ${_RCARG_psformat} '"$_psargs"' | |
284 | while read _npid '"$_fp_args"'; do | | 284 | while read _npid '"$_fp_args"'; do |
285 | case "$_npid" in | | 285 | case "$_npid" in |
286 | PID) | | 286 | PID) |
287 | continue ;; | | 287 | continue ;; |
288 | esac ; '"$_fp_match"' | | 288 | esac ; '"$_fp_match"' |
289 | ${_RCCMD_echo} -n "$_pref$_npid" ; | | 289 | ${_RCCMD_echo} -n "$_pref$_npid" ; |
290 | _pref=" " | | 290 | _pref=" " |
291 | ;; | | 291 | ;; |
292 | esac | | 292 | esac |