Bug 106009 - [ppp] [patch] [request] Fix pppoed startup script to process multiply interfaces
Summary: [ppp] [patch] [request] Fix pppoed startup script to process multiply interfaces
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 6.1-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-11-29 11:50 UTC by Dennis Yusupoff
Modified: 2017-12-31 22:37 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Yusupoff 2006-11-29 11:50:18 UTC
By default, startup script /etc/rc.d/pppoed can not handle starting
pppoed daemon at some interfaces. It's a pity and important, that's why
we fix this script as written below

Fix: ===
#!/bin/sh
#
# $FreeBSD: src/etc/rc.d/pppoed,v 1.3 2004/10/07 13:55:26 mtm Exp $
#

# PROVIDE: pppoed
# REQUIRE: NETWORKING
# BEFORE: DAEMON
# KEYWORD: nojail

# Evseev/EBCEEB: pppoe_interface can contain multiple values

. /etc/rc.subr

name="pppoed"
rcvar="`set_rcvar`"
start_cmd="pppoed_start"
# XXX stop_cmd will not be straightforward
stop_cmd=":"

pppoed_start()
{
        if [ -n "${pppoed_provider}" ]; then
                        pppoed_flags="${pppoed_flags} -p ${pppoed_provider}"
        fi
        echo 'Starting pppoed'
        _opts=$-; set -f
        for iface in ${pppoed_interface}; do
                /usr/libexec/pppoed ${pppoed_flags} $iface
        done
        set +f; set -${_opts}
}

load_rc_config $name
run_rc_command "$1"
===

or diff:
nas4# diff -ua /etc/rc.d.OFF/pppoed /etc/rc.d/pppoed


# PROVIDE: pppoed
@@ -8,6 +8,8 @@
 # BEFORE: DAEMON
 # KEYWORD: nojail

+# Evseev/EBCEEB: pppoe_interface can contain multiple values
+
 . /etc/rc.subr

 name="pppoed"
@@ -23,7 +25,9 @@
        fi
        echo 'Starting pppoed'
        _opts=$-; set -f
-       /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface}
+       for iface in ${pppoed_interface}; do
+               /usr/libexec/pppoed ${pppoed_flags} $iface
+       done
        set +f; set -${_opts}
 }

===--wYw2cL1IsJl0Qnozw02c5xHrfBU1DVgtTiMDbyfCnFdXaXM5
Content-Type: text/plain; name="file.diff"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="file.diff"

--- /etc/rc.d.OFF/pppoed        Sun May  8 11:05:12 2005
+++ /etc/rc.d/pppoed    Thu Jul 27 14:41:07 2006
@@ -1,6 +1,6 @@
 #!/bin/sh
 #
-# $FreeBSD: src/etc/rc.d/pppoed,v 1.2.2.1 2004/10/10 09:50:54 mtm Exp $
+# $FreeBSD: src/etc/rc.d/pppoed,v 1.3 2004/10/07 13:55:26 mtm Exp $
 #
How-To-Repeat: /etc/rc.d/pppoed start, then you have more than one interface in
/etc/rc.conf string "pppoed_interface="xxx" "
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2006-11-30 10:24:34 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-rc

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 07:59:21 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped