Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 52224 - pppd: /etc/ppp/ip-up calls ip-up.local AND ip-down.local
Summary: pppd: /etc/ppp/ip-up calls ip-up.local AND ip-down.local
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
: 52225 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-05-27 16:24 UTC by Jan Koop
Modified: 2004-09-27 03:29 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 Jan Koop 2004-05-27 16:24:40 UTC
I installed a fresh 2004.1 and this is what I got:
/etc/ppp/ip-up has the following contents:
------------------------------------------------------------
#!/bin/sh
[ -f /etc/ppp/ip-up.local ] && . /etc/ppp/ip-up.local
[ -f /etc/ppp/ip-down.local ] && . /etc/ppp/ip-down.local
------------------------------------------------------------

so if ip-up is called, ip-up.local AND ip-down.local are executed! ONLY ip-up.local should be executed!

Since ip-down is a symlink to ip-up this is true for ip-down as well.

Reproducible: Always
Steps to Reproduce:
1. Install Gentoo 2004.1 (or earlier?)
2. look in /etc/ppp/ip-up
3. think about it.

Actual Results:  
When ip-up is called, ip-down.local is executed.
When ip-down is called, ip-up.local is executed.

Expected Results:  
When ip-up is called, ip-down.local is not executed.
When ip-down is called, ip-up.local is not executed.

To resolve this issue,
change /etc/ppp/ip-up to:
---------------------------------------------------------------
#!/bin/sh
[ -f /etc/ppp/${0##*/}.local ] && . /etc/ppp/${0##*/}.local
---------------------------------------------------------------
to make sure a script in /etc/ppp gets executed,

or:
---------------------------------------------------------------
#!/bin/sh
[ -f $0.local ] && . $0.local
---------------------------------------------------------------
Comment 1 Jan Koop 2004-05-27 17:12:49 UTC
*** Bug 52225 has been marked as a duplicate of this bug. ***
Comment 2 Georgi Georgiev 2004-08-02 02:47:48 UTC
Not entirely related, but the ip-up script also contains a reference to /etc/init.d/firewall. Gentoo, however, does not have a "firewall" script.
Comment 3 Alin Năstac (RETIRED) gentoo-dev 2004-09-19 10:34:06 UTC
At the present moment, ppp-2.4.1 ebuilds have ip-up/ip-down scripts filled with comments. 

On the other hand, ppp-2.4.2*.ebuild have rather strange scripts. In addition to what Georgi has said at comment #2, these scripts launch other scripts (if these scripts exists) named $0.local. If someone need to execute some special code on up/down event, seems pretty useless to create another script located in the same directory with the callee script, when it is easier to modify ip-up/ip-down directly.
Comment 4 Heinrich Wendel (RETIRED) gentoo-dev 2004-09-27 03:29:37 UTC
it's not useless to call them, since it's easier to merge user changes on etc-update then, the other issue is fixed in ppp-2.4.2-r*