Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 26921 - Stopping net.ppp0 service.
Summary: Stopping net.ppp0 service.
Status: RESOLVED DUPLICATE of bug 26920
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Linux bug wranglers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-08-19 05:52 UTC by Róbert Čerňanský
Modified: 2005-07-17 13:06 UTC (History)
0 users

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


Attachments
Patch that solves described bugs. (net.ppp0-hs.diff,2.76 KB, patch)
2003-08-19 05:55 UTC, Róbert Čerňanský
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Róbert Čerňanský 2003-08-19 05:52:52 UTC
1. When stopping service net.ppp0, pppd is not killed if link is not active 
(connection is not established).

2. When stopping service net.ppp0, pppd is not killed when the name of script is 
other than net.ppp0 (for example net.ppp0-myisp).


Reproducible: Always
Steps to Reproduce:
first case
1. Configure pppd to be persistent.
2. Do something that pppd will not connect (for ex. turn off modem).
3. Start net.ppp0 service.
4. Stop net.ppp0 service.

second case
1. Copy service init.d/net.ppp0 to init.d/net.ppp0-myisp.
2. Copy conf.d/net.ppp0 to conf.d/net.ppp0-myisp.
3. Add net.ppp0-myisp to default runlevel.
4. Start net.ppp0-myisp service.
5. Stop net.ppp0-myisp service.

Actual Results:  
pppd remains running.

Expected Results:  
1. Init script should kill pppd even if link is not active or print error
message if pppd can not be killed.

2. Init script should stop pppd even if name of net.ppp0 service is different.


I rewrote little bit "stop" section of init script /etc/init.d/net.ppp0. I'm
attaching a patch (original file had this version in header: "1.14 2003/05/18
21:51:34").

This patch solve both described bugs. In first case script goes to kill pppd
even if "$(/sbin/ifconfig | egrep "${IFNAME}")" returns zero.

In second case, when script have a different name, the interface name is
obtained from .pid file and used when necessary.

In both cases is checked if pppd was successfully killed. I have taken idea of
this from init.d/q3ded-osp.

And finally I added one new feature. Script can be now configured not to
generate chat script even if AUTOCFGFILES is set to "yes". I found it useful
when I use two net.ppp0-* scripts and one of its needs special chat script.
This feature have variable AUTOCHATSCRIPT in conf.d/net.ppp0 file. Variable can
have "yes" or "no" values.

I hope that this will be usefull.
Comment 1 Róbert Čerňanský 2003-08-19 05:55:13 UTC
Created attachment 16314 [details, diff]
Patch that solves described bugs.
Comment 2 Martin Holzer (RETIRED) gentoo-dev 2003-08-19 06:05:50 UTC

*** This bug has been marked as a duplicate of 26920 ***