From glebius@cell.sick.ru  Thu Oct 17 07:11:34 2002
Return-Path: <glebius@cell.sick.ru>
Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125])
	by hub.freebsd.org (Postfix) with ESMTP id 8B8DD37B401
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 17 Oct 2002 07:11:34 -0700 (PDT)
Received: from cell.sick.ru (cell.sick.ru [195.91.162.238])
	by mx1.FreeBSD.org (Postfix) with ESMTP id 9759043E65
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 17 Oct 2002 07:11:33 -0700 (PDT)
	(envelope-from glebius@cell.sick.ru)
Received: from cell.sick.ru (glebius@localhost [127.0.0.1])
	by cell.sick.ru (8.12.6/8.12.6) with ESMTP id g9HEBVns001067
	(version=TLSv1/SSLv3 cipher=EDH-RSA-DES-CBC3-SHA bits=168 verify=NO)
	for <FreeBSD-gnats-submit@freebsd.org>; Thu, 17 Oct 2002 18:11:32 +0400 (MSD)
	(envelope-from glebius@cell.sick.ru)
Received: (from glebius@localhost)
	by cell.sick.ru (8.12.6/8.12.6/Submit) id g9HEBVlV001066;
	Thu, 17 Oct 2002 18:11:31 +0400 (MSD)
Message-Id: <200210171411.g9HEBVlV001066@cell.sick.ru>
Date: Thu, 17 Oct 2002 18:11:31 +0400 (MSD)
From: Gleb Smirnoff <glebius@cell.sick.ru>
To: FreeBSD-gnats-submit@freebsd.org
Cc:
Subject: Add ability to run multiple pppoed(8) on startup
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         44170
>Category:       conf
>Synopsis:       [patch] Add ability to run multiple pppoed(8) on startup
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-rc
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Thu Oct 17 07:20:00 PDT 2002
>Closed-Date:    Sat Oct 27 16:13:02 UTC 2012
>Last-Modified:  Sat Oct 27 16:13:02 UTC 2012
>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:
Responsible-Changed-From-To: freebsd-bugs->freebsd-rc 
Responsible-Changed-By: antoine 
Responsible-Changed-When: Fri Mar 21 21:18:27 UTC 2008 
Responsible-Changed-Why:  
Over to maintainer(s). 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44170 
State-Changed-From-To: open->closed 
State-Changed-By: crees 
State-Changed-When: Sat Oct 27 16:13:01 UTC 2012 
State-Changed-Why:  
PPP profiles are available in rc.d/ppp nowadays, which allow for 
multiple ppp instances. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=44170 
>Unformatted:
