Deleted Added
full compact
rc.subr (238416) rc.subr (242183)
1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $
1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $
2# $FreeBSD: head/etc/rc.subr 238416 2012-07-13 06:46:09Z kevlo $
2# $FreeBSD: head/etc/rc.subr 242183 2012-10-27 17:43:30Z crees $
3#
4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
5# All rights reserved.
6#
7# This code is derived from software contributed to The NetBSD Foundation
8# by Luke Mewburn.
9#
10# Redistribution and use in source and binary forms, with or without

--- 245 unchanged lines hidden (view full) ---

256 err 3 'USAGE: _find_processes procname interpreter psargs'
257 fi
258 _procname=$1
259 _interpreter=$2
260 _psargs=$3
261
262 _pref=
263 if [ $_interpreter != "." ]; then # an interpreted script
3#
4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc.
5# All rights reserved.
6#
7# This code is derived from software contributed to The NetBSD Foundation
8# by Luke Mewburn.
9#
10# Redistribution and use in source and binary forms, with or without

--- 245 unchanged lines hidden (view full) ---

256 err 3 'USAGE: _find_processes procname interpreter psargs'
257 fi
258 _procname=$1
259 _interpreter=$2
260 _psargs=$3
261
262 _pref=
263 if [ $_interpreter != "." ]; then # an interpreted script
264 _script=${_chroot}${_chroot:+"/"}$_procname
265 if [ -r $_script ]; then
264 _script="${_chroot}${_chroot:+/}$_procname"
265 if [ -r "$_script" ]; then
266 read _interp < $_script # read interpreter name
267 case "$_interp" in
268 \#!*)
269 _interp=${_interp#\#!} # strip #!
270 set -- $_interp
271 case $1 in
272 */bin/env)
273 shift # drop env to get real name

--- 426 unchanged lines hidden (view full) ---

700 ;;
701
702 start)
703 if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
704 echo 1>&2 "${name} already running? (pid=$rc_pid)."
705 return 1
706 fi
707
266 read _interp < $_script # read interpreter name
267 case "$_interp" in
268 \#!*)
269 _interp=${_interp#\#!} # strip #!
270 set -- $_interp
271 case $1 in
272 */bin/env)
273 shift # drop env to get real name

--- 426 unchanged lines hidden (view full) ---

700 ;;
701
702 start)
703 if [ -z "$rc_fast" -a -n "$rc_pid" ]; then
704 echo 1>&2 "${name} already running? (pid=$rc_pid)."
705 return 1
706 fi
707
708 if [ ! -x ${_chroot}${_chroot:+"/"}${command} ]; then
708 if [ ! -x "${_chroot}${_chroot:+/}${command}" ]; then
709 warn "run_rc_command: cannot run $command"
710 return 1
711 fi
712
713 if ! _run_rc_precmd; then
714 warn "failed precmd routine for ${name}"
715 return 1
716 fi

--- 1027 unchanged lines hidden ---
709 warn "run_rc_command: cannot run $command"
710 return 1
711 fi
712
713 if ! _run_rc_precmd; then
714 warn "failed precmd routine for ${name}"
715 return 1
716 fi

--- 1027 unchanged lines hidden ---