Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 187924 - /etc/init.d/net.ppp0 DSL networking always returns non-zero value
Summary: /etc/init.d/net.ppp0 DSL networking always returns non-zero value
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High major (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-08-06 15:00 UTC by Charles Stewart
Modified: 2007-10-15 11:26 UTC (History)
0 users

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 Charles Stewart 2007-08-06 15:00:42 UTC
Whether on success or failure, /etc/init.d/net.ppp0 always returns a non-zero value.  My networking init script has hooks in place for PPPoE for my DSL connection.  This bug was discovered while attempting to automate some system administration tasks.

Reproducible: Always

Steps to Reproduce:
1. Have a machine connected to an aDSL line using PPPoE (possibly without, needs verification) that will successfully acquire a connection
2. # /etc/init.d/net.ppp0 start
3. # echo $? 
4. observe that the return value is not zero (unexpected in a successful case)
5. # /etc/init.d/net.ppp0 stop
6. disconnect aDSL modem from the telephone line to test failure case
7. # /etc/init.d/net.ppp0 start
8. wait for init script to fail in attempt to acquire a connection
9. # echo $?
10. observe that the return value is not zero (as expected in a failure case)
Actual Results:  
A successful connection on the interface returns a non-zero value

Expected Results:  
A successful connection on the interface should return a zero value
Comment 1 Jakub Moc (RETIRED) gentoo-dev 2007-08-06 20:50:23 UTC
Post emerge --info output here.
Comment 2 Charles Stewart 2007-08-20 02:41:00 UTC
Portage 2.1.2.11 (default-linux/x86/2006.1/server, gcc-4.1.2, glibc-2.5-r4, 2.6.20-gentoo-r7-2 i686)
=================================================================
System uname: 2.6.20-gentoo-r7-2 i686 Pentium III (Coppermine)
Gentoo Base System release 1.12.9
Timestamp of tree: Sun, 19 Aug 2007 08:30:01 +0000
distcc 2.18.3 i686-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
ccache version 2.4 [enabled]
dev-lang/python:     2.4.4-r4
dev-python/pycrypto: 2.0.1-r6
dev-util/ccache:     2.4-r7
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.61
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10
sys-devel/binutils:  2.17
sys-devel/gcc-config: 1.3.16
sys-devel/libtool:   1.5.23b
virtual/os-headers:  2.6.21
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O2 -march=i686 -pipe"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=i686 -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="ccache distlocks metadata-transfer parallel-fetch sandbox sfperms strict"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
MAKEOPTS="-j2"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --delete-after --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --filter=H_**/files/digest-*"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
SYNC="rsync://hades.chuckinator.com/gentoo-portage"
USE="apache2 bash-completion berkdb bitmap-fonts cli cracklib crypt cups dri fortran gdbm gpm iconv isdnlog logrotate midi mudflap ncurses nls nptl nptlonly openmp pam pcre perl ppds pppd python readline reflection session snmp spell spl ssl tcpd truetype truetype-fonts type1-fonts unicode x86 xml xorg zlib" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1 emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mulaw multi null plug rate route share shm softvol" ELIBC="glibc" INPUT_DEVICES="keyboard mouse evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" USERLAND="GNU" VIDEO_CARDS="apm ark chips cirrus cyrix dummy fbdev glint i128 i740 i810 imstt mach64 mga neomagic nsc nv r128 radeon rendition s3 s3virge savage siliconmotion sis sisusb tdfx tga trident tseng v4l vesa vga via vmware voodoo"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, LDFLAGS, LINGUAS, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY

Comment 3 Roy Marples (RETIRED) gentoo-dev 2007-08-20 11:39:59 UTC
Your ppp configuration will also determine the return value.
If the configuration simply launches ppp and it connects in the background (which is the default) then it will always return 1. This is because at the point it returns the ppp interface isn't fully started.

Attach your conf.d/net please
Comment 4 Charles Stewart 2007-08-20 14:10:28 UTC
/etc/conf.d/net:

config_eth0=( "null" )

config_ppp0=( "ppp" )
link_ppp0="eth0"
plugins_ppp0=( "pppoe" )
username_ppp0="ccstewart1982@atl.speedfactory.net"
pppd_ppp0=(
            "debug"
            "defaultroute"
            "updetach"
            "lcp-echo-interval 25"
            "lcp-echo-failure 3"
            "mru 1452"
            "mtu 1452"
            "persist"
            "maxfail 0"
          )
modules_ppp0=( "dhcpcd" )
dhcpcd_ppp0="-NR"
Comment 5 Roy Marples (RETIRED) gentoo-dev 2007-10-15 11:26:22 UTC
As I said, updetach will do this. Don't like it, don't use that option.