Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 147490 - /etc/init.d/net.ppp0 stop won't stop ppp0
Summary: /etc/init.d/net.ppp0 stop won't stop ppp0
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Other
: High normal
Assignee: Roy Marples (RETIRED)
URL:
Whiteboard:
Keywords: InVCS
Depends on:
Blocks:
 
Reported: 2006-09-13 11:56 UTC by Tuan Van (RETIRED)
Modified: 2006-09-27 07:24 UTC (History)
2 users (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 Tuan Van (RETIRED) gentoo-dev 2006-09-13 11:56:08 UTC
$ sudo /etc/init.d/net.ppp0 stop
 * Stopping ppp0
 *   Loading networking modules for ppp0
 *     modules: adsl apipa arping bridge ccwgroup iptunnel tuntap macchanger macnet rename ifconfig iproute2 ip6to4 pppd system
 *   Bringing down ppp0
 *     Stopping pppd on ppp0                [ !! ]

so it happend to restart too. /etc/init.d/net.ppp0 restart doesn't restart ppp0 because:
WARNING:  net.ppp0 has already been started.

# /var/log/message
Sep 13 11:25:58 localhost sudo:     langthang : TTY=unknown ; PWD=/home/langthang ; USER=root ; COMMAND=/etc/init.d/net.ppp0 stop
Sep 13 11:26:06 localhost pppd[27464]: Terminating on signal 15
Sep 13 11:26:06 localhost pppd[27464]: Connect time 145.6 minutes.
Sep 13 11:26:06 localhost pppd[27464]: Sent 973429 bytes, received 664094 bytes.
Sep 13 11:26:12 localhost pppd[27464]: Connection terminated.
Sep 13 11:26:12 localhost pppd[27464]: Modem hangup
Sep 13 11:26:12 localhost pppd[27464]: Exit.
Sep 13 11:26:27 localhost sudo:     langthang : TTY=unknown ; PWD=/home/langthang ; USER=root ; COMMAND=/etc/init.d/net.ppp0 start
Sep 13 11:26:29 localhost rc-scripts: WARNING:  net.ppp0 has already been started.

# emerge --info
Portage 2.1-r2 (hardened/x86/2.6, gcc-3.4.6, glibc-2.3.6-r4, 2.6.16-hardened-r11 i586)
=================================================================
System uname: 2.6.16-hardened-r11 i586 Pentium MMX
Gentoo Base System version 1.12.4
distcc 2.18.3 i586-pc-linux-gnu (protocols 1 and 2) (default port 3632) [disabled]
app-admin/eselect-compiler: [Not Present]
dev-lang/python:     2.4.3-r1
dev-python/pycrypto: 2.0.1-r5
dev-util/ccache:     [Not Present]
dev-util/confcache:  [Not Present]
sys-apps/sandbox:    1.2.17
sys-devel/autoconf:  2.13, 2.59-r7
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2
sys-devel/binutils:  2.16.1-r3
sys-devel/gcc-config: 1.3.13-r3
sys-devel/libtool:   1.4.3-r4, 1.5.22
virtual/os-headers:  2.6.11-r5
ACCEPT_KEYWORDS="x86"
AUTOCLEAN="yes"
CBUILD="i586-pc-linux-gnu"
CFLAGS="-O2 -march=pentium-mmx -fomit-frame-pointer -pipe"
CHOST="i586-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind"
CONFIG_PROTECT_MASK="/etc/env.d /etc/gconf /etc/revdep-rebuild /etc/terminfo"
CXXFLAGS="-O2 -march=pentium-mmx -fomit-frame-pointer -pipe"
DISTDIR="/usr/portage/distfiles"
FEATURES="autoconfig collision-protect distlocks metadata-transfer noinfo noman parallel-fetch sandbox sfperms strict userpriv usersandbox"
GENTOO_MIRRORS="http://distfiles.gentoo.org http://distro.ibiblio.org/pub/linux/distributions/gentoo"
LDFLAGS="-Wl,-O1"
LINGUAS="en_US"
MAKEOPTS="-j2"
PKGDIR="/usr/portage//packages/x86/"
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'"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage/"
SYNC="rsync://192.168.0.4/gentoo-portage"
USE="bzip2 crypt dlloader gpm hardened mmx ncurses pam pic readline tcpd unicode userlocales x86 xorg zlib elibc_glibc input_devices_mouse input_devices_keyboard kernel_linux linguas_en_US userland_GNU"
Unset:  CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LANG, LC_ALL, PORTAGE_RSYNC_EXTRA_OPTS, PORTDIR_OVERLAY
Comment 1 Alin Năstac (RETIRED) gentoo-dev 2006-09-15 01:30:16 UTC
What ppp0 configuration do you have? 
The ppp0 interface was alive when you executed net.ppp0 stop?
Comment 2 Tuan Van (RETIRED) gentoo-dev 2006-09-15 10:58:22 UTC
(In reply to comment #1)

> What ppp0 configuration do you have? 

config_ppp0=( "ppp" )
link_ppp0="eth0"
plugins_ppp0=(
        "pppoe"
)
pppd_ppp0=(
        "defaultroute"
        "usepeerdns"
)
username_ppp0='adsl_user'
password_ppp0='password'

> The ppp0 interface was alive when you executed net.ppp0 stop?
> 

the interface is up and have IP address but the connection is down (ie I can't ping my ISP DNS)
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2006-09-15 16:45:38 UTC
Yep, I saw it too when I kill pppoe-server at the other end.
I guess pppd returns an error code in this case.

Roy, please replace "eend $?" line at the end of pppd_stop() with "eend 0". I've tested this solution successfully (pppd process gets killed and the ppp0 interface is removed even if start-stop-daemon returns error).  
Comment 4 SpanKY gentoo-dev 2006-09-15 22:33:55 UTC
huh ?  that doesnt sound like a fix at all to me
Comment 5 Alin Năstac (RETIRED) gentoo-dev 2006-09-16 00:27:20 UTC
I've investigated a little further. When the peer is dead, start-stop-daemon return 1 even though pppd process was killed by this call (probably after ssd returns, but pppd is killed nevertheless).
If I add --retry 60 to the ssd command line, ssd return 0 after a few seconds.

My proposal is to set timeout to at least 15 seconds.  
Comment 6 Roy Marples (RETIRED) gentoo-dev 2006-09-26 09:12:47 UTC
I've added a --retry to the pppd.sh file in our svn.
Comment 7 Roy Marples (RETIRED) gentoo-dev 2006-09-27 07:24:00 UTC
Fixed in baselayout-1.12.5-r1