Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 23 Aug 2001 00:53:59 +0400 (MSD)
From:      Dmitry Morozovsky <marck@kitty.wpub.hole.ru>
To:        FreeBSD-gnats-submit@freebsd.org
Subject:   bin/29966: cleanup of ppp server socket on unclean startup
Message-ID:  <200108222053.f7MKrwm24440@kitty.wpub.hole.ru>

next in thread | raw e-mail | index | archive | help

>Number:         29966
>Category:       bin
>Synopsis:       cleanup of ppp server socket on unclean startup
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Aug 22 14:00:00 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Dmitry Morozovsky
>Release:        FreeBSD 4.3-STABLE i386
>Organization:
Cronyx Plus LLC
>Environment:

	Various

>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

>Fix:

Add another little knob to rc.conf and appropriate part to
rc.network

--- etc/defaults/rc.conf	Fri Aug 17 11:26:38 2001
+++ /etc/defaults/rc.conf	Thu Aug 23 00:20:33 2001
@@ -105,6 +105,7 @@
 ppp_nat="YES"		# Use PPP's internal network address translation or NO.
 ppp_profile="papchap"	# Which profile to use from /etc/ppp/ppp.conf.
 ppp_user="root"		# Which user to run ppp as
+ppp_server="/var/tmp/loop"	# PPP server socket
 
 ### Network daemon (miscellaneous) & NFS options: ###
 syslogd_enable="YES"		# Run syslog daemon (or NO).
--- etc/rc.network	Mon Aug 20 14:47:38 2001
+++ /etc/rc.network	Thu Aug 23 00:39:51 2001
@@ -243,7 +243,12 @@
 
 		ppp_command="${ppp_command} ${ppp_profile}"
 
+		# Clean old server socket
+		if [ "${ppp_server}" != "" -a -S "${ppp_server}" ]; then
+			rm -f "${ppp_server}"
+		fi
+
		echo "Starting ppp as \"${ppp_user}\""
 		su -m ${ppp_user} -c "exec ${ppp_command}"
 		;;
 	esac
>Release-Note:
>Audit-Trail:
>Unformatted:

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?200108222053.f7MKrwm24440>