Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Dec 2004 20:02:35 +0100 (CET)
From:      Bjoern Koenig <bkoenig@cs.tu-berlin.de>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   conf/75365: `/etc/rc.d/ppp-user stop` doesn't work
Message-ID:  <20041221190235.14276CCD852@mail.alpha-tierchen.de>
Resent-Message-ID: <200412211910.iBLJATJ6002256@freefall.freebsd.org>

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

>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@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:



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