From owner-freebsd-bugs Wed Aug 22 16:20:47 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 07CF537B410 for ; Wed, 22 Aug 2001 16:20:30 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.11.4/8.11.4) id f7MNKT387336; Wed, 22 Aug 2001 16:20:29 -0700 (PDT) (envelope-from gnats) Date: Wed, 22 Aug 2001 16:20:29 -0700 (PDT) Message-Id: <200108222320.f7MNKT387336@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: "Crist J. Clark" Subject: Re: bin/29966: cleanup of ppp server socket on unclean startup Reply-To: "Crist J. Clark" 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 The following reply was made to PR bin/29966; it has been noted by GNATS. From: "Crist J. Clark" To: Dmitry Morozovsky , yar@FreeBSD.ORG Cc: FreeBSD-gnats-submit@FreeBSD.ORG Subject: Re: bin/29966: cleanup of ppp server socket on unclean startup Date: Wed, 22 Aug 2001 16:19:17 -0700 On Thu, Aug 23, 2001 at 12:53:59AM +0400, Dmitry Morozovsky wrote: [snip] > >Description: > > After unclean shutdown (e.g, crash) ppp server socket > remains on file system. Then, if ppp started automatically > during startup, it cannot bind to that socket > > >How-To-Repeat: > > ppp_enable="YES" at /etc/rc.conf > > boot > > killall -9 ppp > shutdown -r now This is actually a more general issue than dealing with start-ups. You can just do, # ppp -background WhatEver Working in background mode Using interface: tun0 PPP enabled # kill -KILL `cat /var/run/tun.pid` ppp -background Earthlink Working in background mode Using interface: tun0 Warning: Local: bind: Address already in use Warning: set server: Failed 2 And get the same failure. > >Fix: > > Add another little knob to rc.conf and appropriate part to > rc.network Actually, a much easier fix is to put your server socket above /var/run. Everything above /var/run is already cleaned during the boot process. It's simply not possible to make the rc(8) scripts completely bulletproof when coming up from a crash. I personally don't see a need for this addition to the process. Using /var/run or some other location automatically cleaned at boot for your socket seems to be a much more general solution. Unless someone has some compelling arguments on why ppp(8) needs this special treatment in rc(8) scripts, I'll close this PR tomorrow. -- Crist J. Clark cjclark@alum.mit.edu To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-bugs" in the body of the message