Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 17 Oct 2002 18:11:31 +0400 (MSD)
From:      Gleb Smirnoff <glebius@cell.sick.ru>
To:        FreeBSD-gnats-submit@FreeBSD.org
Subject:   conf/44170: Add ability to run multiple pppoed(8) on startup
Message-ID:  <200210171411.g9HEBVlV001066@cell.sick.ru>

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

>Number:         44170
>Category:       conf
>Synopsis:       Add ability to run multiple pppoed(8) on startup
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 17 07:20:00 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator:     Gleb Smirnoff
>Release:        FreeBSD 4.7-PRERELEASE i386
>Organization:
Moscow State University
>Environment:
System: FreeBSD cell.sick.ru 4.7-PRERELEASE FreeBSD 4.7-PRERELEASE #7: Fri Sep 6 02:58:47 MSD 2002 root@cell.sick.ru:/usr/obj/usr/src/sys/NUCLEUS i386

>Description:
	If machine acts as an Access Concentrator for PPPoE service, the
	pppoed(8) service should be run on it. Quite often the AC can
	offer PPPoE to several subnets, if it has several interfaces. The 
	rc.conf gives ability to run only one instance of pppoed(8) on
	single interface, the interface name is given in variable
	${pppoed_interface}. The following patch to rc.network gives ability
	to start multiple pppoeds on all interfaces listed in variable
	${pppoed_interfaces}. If this variable is null, then rc.network
	behaves as it does now.
>How-To-Repeat:
	Try to start 2 pppoeds on startup.
>Fix:

--- rc.network.bak	Thu Oct 17 01:15:52 2002
+++ /etc/rc.network	Thu Oct 17 01:15:58 2002
@@ -792,13 +792,21 @@
 
 	case ${pppoed_enable} in
 	[Yy][Ee][Ss])
+		echo -n ' pppoed';
+		if [ -n "${pppoed_interfaces}" ]; then
+			for i in ${pppoed_interfaces}; do
+			_opts=$-; set -f
+			/usr/libexec/pppoed -P /var/run/pppoed.${i}.pid ${pppoed_flags} -p ${pppoed_provider} ${i}
+			set +f; set -${_opts}
+			done
+		else 
 		if [ -n "${pppoed_provider}" ]; then
 			pppoed_flags="${pppoed_flags} -p ${pppoed_provider}"
 		fi
-		echo -n ' pppoed';
 		_opts=$-; set -f
 		/usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface}
 		set +f; set -${_opts}
+		fi
 		;;
 	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?200210171411.g9HEBVlV001066>