Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 70927 Details for
Bug 102820
rp-pppoe now at 3.6
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
adsl module for baselayout-1.11
adsl (text/plain), 2.42 KB, created by
Roy Marples (RETIRED)
on 2005-10-18 05:19:54 UTC
(
hide
)
Description:
adsl module for baselayout-1.11
Filename:
MIME Type:
Creator:
Roy Marples (RETIRED)
Created:
2005-10-18 05:19:54 UTC
Size:
2.42 KB
patch
obsolete
># Copyright (c) 2004-2005 Gentoo Foundation ># Distributed under the terms of the GNU General Public License v2 ># $Header$ > ># Contributed by Roy Marples (uberlord@gentoo.org) > ># char* adsl_provides(void) ># ># Returns a string to change module definition for starting up >adsl_provides() { > echo "adsl" >} > ># void adsl_depend(void) ># ># Sets up the dependancies for the module >adsl_depend() { > after interface > before dhcp >} > ># bool adsl_check_installed(void) ># ># Returns 1 if rp-pppoe is installed, otherwise 0 >adsl_check_installed() { > [[ -x /usr/sbin/adsl-start || -x /usr/sbin/pppoe-start ]] && return 0 > ${1:-false} && eerror "For ADSL support, emerge net-dialup/rp-pppoe" > return 1 >} > ># bool adsl_check_depends(void) ># ># Checks to see if we have the needed functions >adsl_check_depends() { > local f > > for f in interface_variable; do > [[ $( type -t ${f} ) == function ]] && continue > eerror "adsl: missing required function ${f}\n" > return 1 > done > > return 0 >} > ># bool adsl_setup_vars(char *iface) ># ># Checks to see if the ADSL script has been created or not >adsl_setup_vars() { > local iface=${1} startstop=${2} cfgfile > > if [[ -x /usr/sbin/pppoe-start ]]; then > exe=/usr/sbin/pppoe-${startstop} > else > exe=/usr/sbin/adsl-${startstop} > fi > > # Decide which configuration to use. Hopefully there is an > # interface-specific one > cfgfile=/etc/ppp/pppoe-${iface}.conf > if [[ -f ${cfgfile} ]]; then > exe="${exe} ${iface}" > else > cfgfile=/etc/ppp/pppoe.conf > fi > > if [[ ! -f ${cfgfile} ]]; then > eerror "no pppoe.conf file found!" > eerror "Please run adsl-setup to create one" > return 1 > fi > > return 0 >} > ># bool adsl_start(char *iface) ># ># Start ADSL on an interface by calling adsl-start ># ># Returns 0 (true) when successful, non-zero otherwise >adsl_start() { > local iface=${1} exe > > adsl_setup_vars ${iface} start || return 1 > > einfo "Starting ADSL for ${iface}" > ${exe} > eend $? >} > ># bool adsl_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. >adsl_stop() { > local iface=${1} exe > > adsl_check_installed || return 1 > [[ ! -f /var/run/adsl-${iface}.pid ]] && return 1 > > adsl_setup_vars ${iface} stop || return 1 > > einfo "Stopping ADSL for ${iface}" > ${exe} > 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 102820
:
70552
|
70927
|
71021
|
71031
|
71102
|
71103
|
71446
|
71447
|
72957
|
72959
|
73028