From owner-freebsd-bugs Mon Jul 23 10: 0:23 2001 Delivered-To: freebsd-bugs@hub.freebsd.org Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 80D5A37B409 for ; Mon, 23 Jul 2001 10:00:03 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6NH03S91154; Mon, 23 Jul 2001 10:00:03 -0700 (PDT) (envelope-from gnats) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id 0478D37B401 for ; Mon, 23 Jul 2001 09:52:56 -0700 (PDT) (envelope-from nobody@FreeBSD.org) Received: (from nobody@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f6NGqt690059; Mon, 23 Jul 2001 09:52:55 -0700 (PDT) (envelope-from nobody) Message-Id: <200107231652.f6NGqt690059@freefall.freebsd.org> Date: Mon, 23 Jul 2001 09:52:55 -0700 (PDT) From: Jeremiah Gowdy To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-1.0 Subject: conf/29167: rc.pccard doesn't check /var/run/pccardd.pid Sender: owner-freebsd-bugs@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org >Number: 29167 >Category: conf >Synopsis: rc.pccard doesn't check /var/run/pccardd.pid >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Jul 23 10:00:03 PDT 2001 >Closed-Date: >Last-Modified: >Originator: Jeremiah Gowdy >Release: 4.3-STABLE >Organization: Sherline Products >Environment: FreeBSD cx443070-c.vista1.sdca.home.com 4.3-STABLE FreeBSD 4.3-STABLE #1: Sun Jul 22 20:57:30 PDT 2001 root@cx443070-c.vista1.sdca.home.com:/usr/src/sys/compile/SONY i386 >Description: rc.pccard doesn't check /var/run/pccardd.pid to see if pccardd is already running, and therefore if you modify configuration and /etc/netstart, you get a defunct copy of pccardd in addition to the one that was already running. This patch to rc.pccard simply checks for the existence of the .pid file, and if it exists, checks to see if the process is actually running, or if the pid file is just a leftover. In either case, it starts pccardd as usual, but does not start two pccardds. >How-To-Repeat: run /etc/netstart twice (or more) with pccard enabled in rc.conf >Fix: rc.pccard.diff 34,41d33 < if [ -e /var/run/pccardd.pid ] ; then < pid=`cat /var/run/pccardd.pid` < psline=`ps -p $pid | grep -v PID` < if [ ! -n "$psline" ] ; then < rm /var/run/pccardd.pid < fi < fi < if [ ! -e /var/run/pccardd.pid ] ; then 63d54 < fi >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message