Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 146734 - net-dialup/ppp-2.4.4-r1: cannot do persist connection
Summary: net-dialup/ppp-2.4.4-r1: cannot do persist connection
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-07 11:40 UTC by Serge Gavrilov
Modified: 2006-09-28 01:18 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 Serge Gavrilov 2006-09-07 11:40:59 UTC
Hello!

My ADSL provider closes the connection every 12 houres. To restore connection I tried to add persist option into /etc/conf.d/net

pppd_ppp0=( updetach noauth debug defaultroute usepeerdns persist)

But this solution does not work due to following code in /etc/ppp/ip-down:

if [ -x /etc/init.d/net.$1 ]; then
        if /etc/init.d/net.$1 --quiet status ; then
                export IN_BACKGROUND="true"
                /etc/init.d/net.$1 --quiet stop
        fi
fi

This means that persist ppp connection is impossible.

Thanks!
Comment 1 Roy Marples (RETIRED) gentoo-dev 2006-09-07 12:51:36 UTC

*** This bug has been marked as a duplicate of 145034 ***
Comment 2 Serge Gavrilov 2006-09-27 23:52:26 UTC
It looks like that current bug is not duplicate of 145034. At least I have the similar behavoiur after upgrade to baselayout 1.12.5-r1. After closing the connection I have now

/etc/init.d/net.ppp0 status
 * status:  inactive

and connection can be restored only manually.
 
Comment 3 Serge Gavrilov 2006-09-28 00:06:27 UTC
This is my /etc/conf.d/net 

config_ppp0=( 'ppp' )  # Runs /lib/rcscripts/net.modules.d/pppd.sh
# The name of the Ethernet interface over which PPPoE links
link_ppp0='nas0' # Must correspond to the -c option of the br2684ctl utility
plugins_ppp0=( pppoe )
# 'man pppd' shows other options. Compression is disabled because it is
# rarely taken advantage of, and may interfere with the connection.
# Add option 'usepeerdns' to populate /etc/resolv.conf
pppd_ppp0=( updetach noauth debug defaultroute usepeerdns persist)
username_ppp0='ptn'  # E.g. 'fredbloggs@hg5.btclick.com'
password_ppp0='ptn'  # ADSL password, assigned by your ISP

# If the kernel modules are not built-in, then they must be loaded
# before starting the PPP daemon:
function preup() {
        if [[ "$1" = "ppp0" ]] ; then
                modprobe -q speedtch
                # The number after "-c" corresponds with the Ethernet interface,
                # e.g. 0 for nas0.
                # Use "-e 0" for LLC mux or "-e 1" for VC mux.
                # The 2 numbers after "-a" represent the VPI & VCI of your ISP, and
                # they are separated by a dot. Choose here, or ask your ISP:
                #   http://www.linux-usb.org/SpeedTouch/faq/index.html#q12
                eval local nasifname=\$\{link_$1\}
                start-stop-daemon --start --background --pidfile /var/run/${nasifname}.pid --make-pidfile \
                        --exec /sbin/br2684ctl -- -c ${nasifname#nas} -e 0 -a 0.35
		return 0
        fi
}

function postdown() {
        if [[ "$1" = "ppp0" ]] ; then
                eval local nasifname=\$\{link_$1\}
                start-stop-daemon --stop --pidfile /var/run/${nasifname}.pid
                return 0
        fi
}
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2006-09-28 00:29:35 UTC
OK, you used the old way to set PPPoE over Speedtouch. Please try to set the connection as explained in the updated README file of the speedtouch-usb package.

If it doesn't work, check nas0 status by running:
 /etc/init.d/net.nas0 status
Comment 5 Serge Gavrilov 2006-09-28 01:18:17 UTC
Thanks, now it works!!! Sorry! But after upgrade I have another small problem (see 
bug 149385)