Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 59321 - net.eth0 fails to bring up adsl (not reading pppoe.conf properly)
Summary: net.eth0 fails to bring up adsl (not reading pppoe.conf properly)
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All All
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 66472
  Show dependency tree
 
Reported: 2004-08-03 18:02 UTC by Don Seiler (RETIRED)
Modified: 2004-10-24 21:44 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Don Seiler (RETIRED) gentoo-dev 2004-08-03 18:02:13 UTC
Using baselayout-1.10.1-r2 and rp-pppoe-3.5-r1

Per our conversation earlier today.  Here is what happens when I try to start adsl via net.eth0:

# /etc/init.d/net.eth0 start
 * Bringing eth0 up...
 *   eth0 adsl
 *     Starting ADSL for eth0
adsl-start: Cannot read configuration file '/dev/fd/63'
/sbin/runscript.sh: line 1:  6848 Broken pipe             cat ${cfgfile}  [ !! ]

Using '/etc/init.d/rp-pppoe start' works fine, as does running adsl-start manually.  I ran the net.eth0 with NET_DEBUG=1.  There was a lot of output and I couldn't figure out how to pipe it to a file, but here is the interesting bit that you might want, nothing too informative though:

++ cat /etc/ppp/pppoe.conf
+ /usr/sbin/adsl-start /dev/fd/63
adsl-start: Cannot read configuration file '/dev/fd/63'
/sbin/runscript.sh: line 1:  6960 Broken pipe             cat ${cfgfile}

I have no idea where it's getting '/dev/fd/63' from.  The only parts I have changed in /etc/conf.d/net are:

ifconfig_eth0=( "adsl" )
ifconfig_eth1=(
        "172.16.30.1 broadcast 172.16.30.255 netmask 255.255.255.0"
)
Comment 1 Don Seiler (RETIRED) gentoo-dev 2004-08-03 19:08:35 UTC
FYI that was with bash 2.05b-r10.  I'm emerging bash 3.0-r4 now.  I'll report back.
Comment 2 Moshe Kamensky 2004-08-04 12:29:22 UTC
I simply don't think that adsl-(start|stop) can read the config from stdin. It doesn't say it can in the documentation. I changed it to use a temp file, and this error is gone.
Comment 3 SpanKY gentoo-dev 2004-08-27 19:39:00 UTC
yes, latest rp-pppoe (3.5) has changed formats

i've got a patch to fix this as i just debugged it on my little netwinder ... i'll post it here shortly
Comment 4 SpanKY gentoo-dev 2004-08-27 20:52:33 UTC
not sure how this could be coded, but here's how we fix this problem:
iface_start_adsl() {
    local cfgfile iface=${1} user="${2}"

    # Decide which configuration to use.  Hopefully there is an
    # interface-specific one
    cfgfile=/etc/ppp/pppoe-$iface.conf
    [[ -f ${cfgfile} ]] || cfgfile=/etc/ppp/pppoe.conf
     
    # Start ADSL with the cfgfile, but override ETH and PIDFILE
    einfo "    Starting ADSL for ${iface}"
    GENTOO_PIDFILE=/var/run/adsl-${iface}.pid \
    /usr/sbin/adsl-start ${iface} ${user} ${cfgfile} > ${devnull}
    eend $? || return $?
}

then we'd have to have a variable in /etc/conf.d/net:
ifconfig_eth0_user="my-adsl-user"

then when we call iface_start_adsl, the first param is the iface and the second param is the ISP account name (ifconfig_eth0_user)

under this setup, the user would not have to setup anything in /etc/ppp/pppoe.conf ... just /etc/ppp/pap-secrets (the password)
Comment 5 SpanKY gentoo-dev 2004-09-10 10:38:42 UTC
also, the stop function will need similar updates to make it work properly
Comment 6 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-27 04:25:52 UTC
why not use the init script from rp-pppoe?
Comment 7 SpanKY gentoo-dev 2004-09-27 19:11:15 UTC
because it doesnt provide the net.* stuff that it should

perhaps if it was named 'net.adsl' instead of 'rp-pppoe'

besides, if we went that route, it would require users setting up all the ppp files ... going the current route we are, they have to setup just one, pap-secrets
Comment 8 SpanKY gentoo-dev 2004-09-29 23:04:04 UTC
seems 1.11.1 and the new net module system makes this much worse

now when i try to start an adsl interface, i get this error:
Configuration not set for eth0

and then it defaults to dhcp !
Comment 9 Aron Griffis (RETIRED) gentoo-dev 2004-10-24 21:44:07 UTC
fixed in latest baselayout-1.11.x (the only one currently available) and rp-pppoe-3.5-r3