rc.subr (130161) | rc.subr (131061) |
---|---|
1# $NetBSD: rc.subr,v 1.60 2003/07/26 05:13:47 lukem Exp $ | 1# $NetBSD: rc.subr,v 1.60 2003/07/26 05:13:47 lukem Exp $ |
2# $FreeBSD: head/etc/rc.subr 130161 2004-06-06 18:06:09Z mtm $ | 2# $FreeBSD: head/etc/rc.subr 131061 2004-06-24 16:57:49Z mtm $ |
3# 4# Copyright (c) 1997-2002 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 --- 178 unchanged lines hidden (view full) --- 189{ 190 _pidfile=$1 191 _procname=$2 192 _interpreter=$3 193 if [ -z "$_pidfile" -o -z "$_procname" ]; then 194 err 3 'USAGE: check_pidfile pidfile procname [interpreter]' 195 fi 196 if [ ! -f $_pidfile ]; then | 3# 4# Copyright (c) 1997-2002 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 --- 178 unchanged lines hidden (view full) --- 189{ 190 _pidfile=$1 191 _procname=$2 192 _interpreter=$3 193 if [ -z "$_pidfile" -o -z "$_procname" ]; then 194 err 3 'USAGE: check_pidfile pidfile procname [interpreter]' 195 fi 196 if [ ! -f $_pidfile ]; then |
197 debug "pid file {$_pidfile): not readable." | 197 debug "pid file ($_pidfile): not readable." |
198 return 199 fi 200 read _pid _junk < $_pidfile 201 if [ -z "$_pid" ]; then 202 debug "pid file {$_pidfile): no pid in file." 203 return 204 fi 205 _find_processes $_procname ${_interpreter:-.} '-p '"$_pid" --- 1082 unchanged lines hidden --- | 198 return 199 fi 200 read _pid _junk < $_pidfile 201 if [ -z "$_pid" ]; then 202 debug "pid file {$_pidfile): no pid in file." 203 return 204 fi 205 _find_processes $_procname ${_interpreter:-.} '-p '"$_pid" --- 1082 unchanged lines hidden --- |