rc.subr (161396) | rc.subr (161435) |
---|---|
1# $NetBSD: rc.subr,v 1.66 2006/04/01 10:05:50 he Exp $ | 1# $NetBSD: rc.subr,v 1.66 2006/04/01 10:05:50 he Exp $ |
2# $FreeBSD: head/etc/rc.subr 161396 2006-08-17 08:04:20Z yar $ | 2# $FreeBSD: head/etc/rc.subr 161435 2006-08-18 12:10:18Z yar $ |
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 --- 38 unchanged lines hidden (view full) --- 49 50_rc_subr_loaded="YES" 51 52SYSCTL="/sbin/sysctl" 53SYSCTL_N="${SYSCTL} -n" 54CMD_OSTYPE="${SYSCTL_N} kern.ostype" 55OSTYPE=`${CMD_OSTYPE}` 56ID="/usr/bin/id" | 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 --- 38 unchanged lines hidden (view full) --- 49 50_rc_subr_loaded="YES" 51 52SYSCTL="/sbin/sysctl" 53SYSCTL_N="${SYSCTL} -n" 54CMD_OSTYPE="${SYSCTL_N} kern.ostype" 55OSTYPE=`${CMD_OSTYPE}` 56ID="/usr/bin/id" |
57JID=`ps -p $$ -o jid=` | |
58IDCMD="if [ -x $ID ]; then $ID -un; fi" | 57IDCMD="if [ -x $ID ]; then $ID -un; fi" |
58PS="/bin/ps -ww" 59JID=`$PS -p $$ -o jid=` |
|
59 60case ${OSTYPE} in 61FreeBSD) 62 SYSCTL_W="${SYSCTL}" 63 ;; 64NetBSD) 65 SYSCTL_W="${SYSCTL} -w" 66 ;; --- 206 unchanged lines hidden (view full) --- 273 ${_interp}|"${_interp} "*|"${_interpbn}: ${_procname}"*)' 274 else # a normal daemon 275 _procnamebn=${_procname##*/} 276 _fp_args='_arg0 _argv' 277 _fp_match='case "$_arg0" in 278 $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")' 279 fi 280 | 60 61case ${OSTYPE} in 62FreeBSD) 63 SYSCTL_W="${SYSCTL}" 64 ;; 65NetBSD) 66 SYSCTL_W="${SYSCTL} -w" 67 ;; --- 206 unchanged lines hidden (view full) --- 274 ${_interp}|"${_interp} "*|"${_interpbn}: ${_procname}"*)' 275 else # a normal daemon 276 _procnamebn=${_procname##*/} 277 _fp_args='_arg0 _argv' 278 _fp_match='case "$_arg0" in 279 $_procname|$_procnamebn|${_procnamebn}:|"(${_procnamebn})"|"[${_procnamebn}]")' 280 fi 281 |
281 _proccheck=' 282 ps 2>/dev/null -o "pid,jid,command" '"$_psargs"' | | 282 _proccheck="\ 283 $PS 2>/dev/null -o pid,jid,command $_psargs"' | |
283 while read _npid _jid '"$_fp_args"'; do 284 case "$_npid" in 285 PID) 286 continue;; 287 esac; '"$_fp_match"' 288 if [ "$JID" -eq "$_jid" ]; 289 then echo -n "$_pref$_npid"; 290 _pref=" "; --- 1228 unchanged lines hidden --- | 284 while read _npid _jid '"$_fp_args"'; do 285 case "$_npid" in 286 PID) 287 continue;; 288 esac; '"$_fp_match"' 289 if [ "$JID" -eq "$_jid" ]; 290 then echo -n "$_pref$_npid"; 291 _pref=" "; --- 1228 unchanged lines hidden --- |