conf/75365: `/etc/rc.d/ppp-user stop` doesn't work

Bjoern Koenig bkoenig at cs.tu-berlin.de
Tue Dec 21 11:10:30 PST 2004


>Number:         75365
>Category:       conf
>Synopsis:       `/etc/rc.d/ppp-user stop` doesn't work
>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:   Tue Dec 21 19:10:29 GMT 2004
>Closed-Date:
>Last-Modified:
>Originator:     Bjoern Koenig
>Release:        FreeBSD 5.3-STABLE i386
>Organization:
>Environment:
System: FreeBSD hoppel.local 5.3-STABLE FreeBSD 5.3-STABLE #0: Sat Dec 11 18:24:44 CET 2004 root at hoppel.local:/usr/obj/usr/src/sys/HOPPEL i386


	
>Description:
	the execution of `/etc/rc.d/ppp-user stop` won't stop a running ppp process
	
>How-To-Repeat:
	
>Fix:
--- etc/rc.d/ppp-user   Tue Dec 21 19:00:55 2004
+++ etc/rc.d/ppp-user   Tue Dec 21 19:48:36 2004
@@ -11,11 +11,17 @@
 
 name="ppp"
 rcvar="ppp_enable"
+ppp_command="/usr/sbin/${name}"
 start_cmd="ppp_start"
-stop_cmd=":"
+command="${ppp_command}"

 ppp_start()
 {
+	if [ -n "$rc_pid" ]; then
+		echo "${name} already running? (pid=$rc_pid)."
+		exit 1
+	fi
+
 	# Establish ppp mode.
 	#
 	if [ "${ppp_mode}" != "ddial" -a "${ppp_mode}" != "direct" \
@@ -24,7 +30,7 @@
 		ppp_mode="auto"
 	fi
 
-	ppp_command="/usr/sbin/ppp -quiet -${ppp_mode}"
+	ppp_command="${ppp_command} -quiet -${ppp_mode}"
 
 	# Switch on NAT mode?
 	#
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list