Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 22 Aug 2001 16:20:29 -0700 (PDT)
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: bin/29966: cleanup of ppp server socket on unclean startup
Message-ID:  <200108222320.f7MNKT387336@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/29966; it has been noted by GNATS.

From: "Crist J. Clark" <cristjc@earthlink.net>
To: Dmitry Morozovsky <marck@rinet.ru>, 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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200108222320.f7MNKT387336>