Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 61517 Details for
Bug 53954
Support for kernel PPPoE in the RC scripts
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
/lib/rcscripts/net.modules.d/pppoe
pppoe (text/plain), 3.21 KB, created by
Alin Năstac (RETIRED)
on 2005-06-19 14:13:01 UTC
(
hide
)
Description:
/lib/rcscripts/net.modules.d/pppoe
Filename:
MIME Type:
Creator:
Alin Năstac (RETIRED)
Created:
2005-06-19 14:13:01 UTC
Size:
3.21 KB
patch
obsolete
># Copyright (c) 2004-2005 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header: $ > ># Contributed by Alin Nastac (mrness@gentoo.org) > ># char* pppoe_provides(void) ># ># Returns a string to change module definition for starting up >pppoe_provides() { > echo "pppoe" >} > ># void pppoe_depend(void) ># ># Sets up the dependancies for the module >pppoe_depend() { > after interface > before dhcp >} > ># bool pppoe_check_installed(void) ># ># Returns 1 if pppd is installed, otherwise 0 >pppoe_check_installed() { > [[ -x /usr/sbin/pppd ]] || { > eerror "For PPPoE support, emerge net-dialup/ppp" > return 1 > } > return 0 >} > ># bool pppoe_check_depends(void) ># ># Checks to see if we have the needed functions >pppoe_check_depends() { > local f > > for f in interface_variable; do > [[ $( type -t ${f} ) == function ]] && continue > eerror "pppoe: missing required function ${f}\n" > return 1 > done > > return 0 >} > ># bool pppoe_setup_vars(char *iface) ># ># Read pppd parameters >pppoe_setup_vars() { > local iface=${1} > > # Might or might not be set in conf.d/net > eval user=\"\$\{pppoe_user_${ifvar}\}\" > eval password=\"\$\{pppoe_password_${ifvar}\}\" > eval ondemand_idletime=\"\$\{pppoe_ondemand_idletime_${ifvar}\}\" > eval mtu=\"\$\{pppoe_mtu_${ifvar}\}\" > eval echo_interval=\"\$\{pppoe_echo_interval_${ifvar}\}\" > eval echo_failure=\"\$\{pppoe_echo_failure_${ifvar}\}\" > > return 0 >} > ># bool pppoe_start(char *iface) ># ># Start ADSL on an interface by calling adsl-start ># ># Returns 0 (true) when successful, non-zero otherwise >pppoe_start() { > local iface=${1} user ifvar=$( interface_variable ${1} ) cmdline=/usr/sbin/pppd > > pppoe_setup_vars ${iface} || return 1 > [[ -n "${password}" ]] && { > update_secrets_file "/etc/ppp/pap-secrets" "${user}" "${iface}" "${password}" || { > eerror "Failed to update PAP secrets file" > return 1 > } > update_secrets_file "/etc/ppp/chap-secrets" "${user}" "${iface}" "${password}" || { > eerror "Failed to update CHAP secrets file" > return 1 > } > } > > einfo "Starting PPPoE for ${iface}" > [[ -n ${ondemand_idletime} ]] && \ > cmdline="${cmdline} demand idle ${ondemand_idletime} 10.112.112.112:10.112.112.113 \ > ipcp-accept-remote ipcp-accept-local connect true" > cmdline="${cmdline} plugin rp-pppoe.so ${iface} remotename ${iface} linkname ${iface} \ > hide-password persist maxfail 0 default-asyncmap noipdefault noauth defaultroute \ > noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp \ > lcp-echo-interval ${echo_interval:-15} lcp-echo-failure ${echo_failure:-3} \ > mtu ${mtu:-1492} mru ${mtu:-1492}" > [[ -n ${user} ]] && \ > cmdline="${cmdline} user ${user}" > ${cmdline} &> /tmp/log.pppoe > eend $? >} > ># bool pppoe_stop(char *iface) ># ># Stop ADSL on an interface by calling adsl-stop ># ># Returns 0 (true) when there appears to be an ADSL interface to stop, ># and we attempted to stop it. This does not necessarily indicate ># that adsl-stop was successful. Returns non-zero when there was ># nothing to stop. >pppoe_stop() { > local iface=${1} cfgfile pidfile=/var/run/ppp-${iface}.pid > > [[ ! -f ${pidfile} ]] && return 1 > > local pid=$(head -n 1 ${pidfile}) > einfo "Stopping PPPoE for ${iface}" > kill -s HUP ${pid} && \ > process_finished ${pid} /usr/sbin/pppd > eend $? > > return 0 # we did *attempt* to stop adsl >}
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 53954
:
61462
|
61517
|
61518
|
61523
|
61597
|
61598
|
61599
|
61600
|
61699
|
61844
|
61849
|
62051
|
62083
|
62109
|
62123
|
62124
|
62377
|
62505
|
62508