Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 171322 - not execute postup() for ppp
Summary: not execute postup() for ppp
Status: RESOLVED WORKSFORME
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] baselayout (show other bugs)
Hardware: x86 Linux
: High minor (vote)
Assignee: Gentoo's Team for Core System packages
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-03-18 09:27 UTC by Tengiz Sharafiev
Modified: 2007-05-02 12:59 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 Tengiz Sharafiev 2007-03-18 09:27:06 UTC
not execute postup() for net.ppp0 in =sys-apps/baselayout-1.12.9

Reproducible: Always

Steps to Reproduce:
1. configure /etc/conf.d/net for pppoe
$ cat /etc/conf.d/net
modules=( "pump")
config_eth0=( "dhcp" )
dhcp_eth0="release nodns nontp nonis nosendhost"

#PPP
config_ppp0=( "ppp" )
link_ppp0="eth0"
plugins_ppp0=( "pppoe" )
username_ppp0='d14652@hitv.ru'
pppd_ppp0=(
"updetach"
"noauth"
"lock"
"lcp-echo-interval 10" # Send a LCP echo every 15 seconds 
"lcp-echo-failure 10" # Make peer dead after 3 seconds of in-activity 
"holdoff 4"
"usepeerdns" )

preup()
{
einfo "preup"
return 0
}

predown()
{
einfo "predown"
return 0
}

postup() {
einfo "postup"
return 0
}

postdown()
{
einfo "postdown"
return 0
}
2. # ln -s /etc/init.d/net.lo /etc/init.d/net.ppp0
3. # /etc/init.d/net.ppp0 start

Actual Results:  
 * Starting ppp0
 *   Running preup function
 *     preup                                                              [ ok ]
 *   Bringing up ppp0
 *     ppp
 *       Running pppd ...
 *       ppp0 received address 10.0.17.129

Expected Results:  
for example how work net.eth0:
# /etc/init.d/net.eth0 start
 * Starting eth0
 *   Running preup function
 *     preup                                                              [ ok ]
 *   Bringing up eth0
 *     dhcp
 *       Running pump ...                                                 [ ok ]
 *       eth0 received address 192.168.1.4/24
 *   Running postup function
 *     postup

In /lib/rcscripts/net/pppd.sh:pppd_start()(line 217) should be replaced "exit 0" to  "return 0" . Аrter it works correctly.
Comment 1 Roy Marples (RETIRED) gentoo-dev 2007-05-02 12:59:22 UTC
Due to the nature of ppp, it will never echo postup. This is because ppp interfaces are re-entrant. This means that ppp will re-call net.ppp0 and postup will then get run.

Just because you have updetach in your options does not change this.

For proof, echo something to a file on the disk. Re-open if you disagree.