From owner-freebsd-current Sun Oct 6 12:50:17 2002 Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1577137B404 for ; Sun, 6 Oct 2002 12:50:14 -0700 (PDT) Received: from out016.verizon.net (out016pub.verizon.net [206.46.170.92]) by mx1.FreeBSD.org (Postfix) with ESMTP id 6070343E75 for ; Sun, 6 Oct 2002 12:50:13 -0700 (PDT) (envelope-from arlankfo@verizon.net) Received: from verizon.net ([138.88.130.176]) by out016.verizon.net (InterMail vM.5.01.05.09 201-253-122-126-109-20020611) with ESMTP id <20021006195012.KHCL9318.out016.verizon.net@verizon.net> for ; Sun, 6 Oct 2002 14:50:12 -0500 To: current@freebsd.org Subject: suggested patch for small user ppp annoyance From: "Andrew Lankford" Reply-To: "Andrew Lankford" Date: Sun, 06 Oct 2002 15:50:13 -0400 Message-Id: <20021006195012.KHCL9318.out016.verizon.net@verizon.net> Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Once in a while, user ppp is killed rather abruptly and it leaves a diagnostic socket behind, which blocks the creation of a diagnostic socket after reboot. Anyway, I propose adding another variable to rc.conf, something along the lines of the three patches here. The default value for pppctl_socket would be NO or just "". In my case however, I'll set it to "/var/ppp/ppp". Whaddayall think? --- usr/src/etc/defaults/rc.conf.orig Sun Oct 6 02:21:33 2002 +++ usr/src/etc/defaults/rc.conf Sun Oct 6 12:59:53 2002 @@ -115,6 +115,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 +pppctl_socket="NO" # Delete old pppctl diagnostic socket at boot (or NO). ### Network daemon (miscellaneous) ### syslogd_enable="YES" # Run syslog daemon (or NO). --- usr/src/etc/rc.d/ppp-user.orig Sun Oct 6 01:58:05 2002 +++ usr/src/etc/rc.d/ppp-user Sun Oct 6 12:59:17 2002 @@ -15,7 +15,16 @@ start_cmd="ppp_start" stop_cmd=":" ppp_start() -{ +{ + # Check for orphaned pppctl diagnostic socket, delete it. + [ "${pppctl_socket}" ] && case ${pppctl_socket} in + [Nn][Oo]) + # Do nothing + ;; + *) + [ -S "${pppctl_socket}" ] && rm ${pppctl_socket} + esac + # Establish ppp mode. # if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ --- usr/src/etc/rc.network.orig Sat Sep 21 01:36:18 2002 +++ usr/src/etc/rc.network Sun Oct 6 12:57:29 2002 @@ -272,6 +272,16 @@ network_pass1() { # case ${ppp_enable} in [Yy][Ee][Ss]) + # Check for orphaned pppctl diagnostic socket + [ "${pppctl_socket" ] && case ${pppctl_socket} in + [Nn][Oo]) + # Don't do anything + ;; + *) + # Delete socket if it still exists + [ -S "${pppctl_socket}" ] && rm ${pppctl_socket} + esac + # Establish ppp mode. # if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-current" in the body of the message