Date: Mon, 11 Nov 2002 22:12:32 -0500 From: Andrew Lankford <arlankfo@141.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: conf/45226: Fix for rc.network, ppp-user annoyance Message-ID: <20021112031225.VHNT3528.out003.verizon.net@verizon.net>
next in thread | raw e-mail | index | archive | help
>Number: 45226
>Category: conf
>Synopsis: Fix for rc.network, ppp-user annoyance
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: change-request
>Submitter-Id: current-users
>Arrival-Date: Mon Nov 11 19:20:01 PST 2002
>Closed-Date:
>Last-Modified:
>Originator: Andrew Lankford
>Release: FreeBSD 5.0-CURRENT i386
>Organization:
N/A
>Environment:
System: FreeBSD bogushost2 5.0-CURRENT FreeBSD 5.0-CURRENT #21: Sun Nov 10 13:42:51 EST 2002 root@bogushost2:/usr/obj/usr/src/sys/ARL5KERNEL i386
(also applies to /etc/rc.network in STABLE)
>Description:
If user ppp doesn't exit cleanly, a control socket created with the
"set socket ..." isn't erased. Instead, it prevents a fresh control
socket from being created the next time user ppp is launched at
startup.
>How-To-Repeat:
Power failure, etc...
>Fix:
The script that launches syslogd deletes /var/run/log immediately
beforehand. The same thing ought to be done with user ppp control
sockets.
An additional variable is added to rc.conf, pppctl_socket, which will
be set to "" by default (or maybe "/var/run/internet").
The patches in rc.network and ppp-user check for the presence of the
socket and delete it.
Three small patches for -CURRENT:
--- /usr/src/etc/defaults/rc.conf.orig Mon Nov 11 20:53:02 2002
+++ /usr/src/etc/defaults/rc.conf Mon Nov 11 20:54:18 2002
@@ -116,6 +116,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="" # Socket for pppctl to use (or empty string "")
### Network daemon (miscellaneous) ###
syslogd_enable="YES" # Run syslog daemon (or NO).
--- /usr/src/etc/rc.d/ppp-user.orig Mon Oct 14 09:39:44 2002
+++ /usr/src/etc/rc.d/ppp-user Mon Nov 11 21:47:48 2002
@@ -15,7 +15,11 @@
stop_cmd=":"
ppp_start()
-{
+{
+ # Erase old pppctl socket
+ #
+ [ -S "${pppctl_socket}" ] && rm -f ${pppctl_socket}
+
# Establish ppp mode.
#
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
--- /usr/src/etc/rc.network.orig Mon Nov 11 20:57:25 2002
+++ /usr/src/etc/rc.network Mon Nov 11 21:48:02 2002
@@ -282,6 +282,10 @@
#
case ${ppp_enable} in
[Yy][Ee][Ss])
+ # Erase old pppctl socket
+ #
+ [ -S "${pppctl_socket}" ] && rm -f ${pppctl_socket}
+
# Establish ppp mode.
#
if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
>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?20021112031225.VHNT3528.out003.verizon.net>
