Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 76641 - net-dialup/ppp and net-dialup/isdn4k-utils both installs /etc/ppp/ip-{up,down}
Summary: net-dialup/ppp and net-dialup/isdn4k-utils both installs /etc/ppp/ip-{up,down}
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Dialup Developers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-01-04 07:25 UTC by Stefan Briesenick (RETIRED)
Modified: 2005-02-06 01:44 UTC (History)
1 user (show)

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


Attachments
isdn4linux.png (isdn4linux.png,26.38 KB, image/png)
2005-01-04 09:01 UTC, Stefan Briesenick (RETIRED)
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Stefan Briesenick (RETIRED) gentoo-dev 2005-01-04 07:25:40 UTC
see summary. This is very odd. We should find a solution, that only one package installs the scripts. Or we should enforce different names somehow.

I don't know the best solution for this problem, so lets discuss it here.

my suggestions are:

1. put it into an own package so ppp and isdn4k-utils can depend on it
2. put it into baselayout / networking


Reproducible: Always
Steps to Reproduce:
Comment 1 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-04 08:35:22 UTC
Lets do it like debian and probably other distros and only include it on ppp:

http://packages.debian.org/cgi-bin/search_contents.pl?searchmode=filelist&word=ppp&version=stable&arch=i386


Do we need ip-up in isdn4k-utils? Should we not depend on ppp then, because ppp calls ip-up?
Baselayout is no good idea, since baselayout should contain only really basic things
and an extra pkg for 2 Files, not really ..
Comment 2 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-04 09:00:01 UTC
ppp is ok for me. But do we have to depend on ppp then?

ipppd is a special, old-world isdn variant of pppd. It's either an add-on or replacement for pppd. Denpends on your personal setup.

If you have a CAPI based card, you don't need ipppd at all. You can use the ppp-capiplugin from the capi4k-utils package then which extends the normal pppd.

ipppd is only needed if you have a non-CAPI based card (HiSax). And even then, you can also have DSL or a Modem and need pppd additionally.

A attach a nice overview of ISDN/CAPI for Linux. This explains a lot about the very complex ISDN framework.

But keep in mind: CAPI is new-world, I4L is old-world. All I4L-drivers will be converted to CAPI anytime soon. 'mISDN' is the magic thing! ;-)
Comment 3 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-04 09:01:53 UTC
Created attachment 47600 [details]
isdn4linux.png

Overview of CAPI/ISDN for Linux.
Comment 4 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-04 09:13:16 UTC
btw: I'm working again on the isdn stuff. So I can include our final conclusion then. And furthermore, since baselayout now handles also net.ippp0, do we still need this script in isdn4k-utils? I would remove it then!
Comment 5 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-04 09:19:40 UTC
We can remove it .. but then we should depend on the baselayout version containing the ippp extension. Did you check that it works?
( I do not use isdn for dialing, only for call monitoring )
Comment 6 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-04 10:10:36 UTC
No, I haven't checked it yet. But I will, before I remove it. Depending on the right baselayout is no problem.
Comment 7 Alin Năstac (RETIRED) gentoo-dev 2005-01-06 09:55:25 UTC
my 2 cents: as long as ipppd is needed, we will install ip-{up,down} scripts. The only way of not doing that will be putting net-dialup/ppp in DEPEND.

Thoughts?
Comment 8 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-11 11:31:41 UTC
it's really odd, that two ebuilds installs the "same" files. At least we should make them identical! They're different right now! This is confusing if you need both, pppd for your modem or DSL and ipppd for your old HiSax card. These scripts have to handle both cases and then they should be identical. Then it is no problem if both ebuilds installs them.
Comment 9 Alin Năstac (RETIRED) gentoo-dev 2005-01-21 18:13:45 UTC
I've copied scripts from ppp-2.4.3 to ppp-2.4.2 (replaced "$1" "$2" .. with "$@")

the only difference between ip-down from the last isdn4k-utils (which btw will become stable in near future) versus the one from ppp-2.4.3 is:

bash-2.05b$ diff ip-down ../../../ppp/files/2.4.3/ip-down
31,36d30
< # Recreate the default route so autodial works
< [ -s /etc/conf.d/net ] && . /etc/conf.d/net
< if [ -n "${gateway}" ] && [ "${gateway%/*}" = "$1" ]; then
<       /sbin/route add default dev ${gateway%/*}
< fi
<

Are you sure that isdn4k-utils doesn't need this part of the script?
Comment 10 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-22 10:06:08 UTC
this part is for resetting the default-route after the connection has closed. You need this ALWAYS (ppp and ippp), if you need that behavior.

But it should be more embedded in baselayout. This is a dirty hack right now.

1. /etc/init.d/net.* sets the default-route (if configured so)
2. you make a (i)ppp-connection -> default-route is changed (if configured)
3. connection is closed -> default-route is set to the original one (see 1.)

since ppp is part of the network-layer, the ip-{up,down} scripts should be part of baselayout somehow and perfectly embedded in the whole net-framework.

Furthermore: ip-{up,down} should not be user-editable. We should source a ip-{up,down}.local and ip-{up,down}.<device> in these scripts. And this should be the place, where the user can change things.

something like this ($1 is the interface-name):

[ -x ${0}.${1} ] && ${0}.${1} "$@"
[ -x ${0}.local ] && ${0}.local "$@"

at the end of both scripts. So one can do fancy things dependent on a particular device (i.e. ippp0) and/or in general in 'local'.

just my 0.02 Euros. ;-)
Comment 11 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-28 06:37:05 UTC
I think this should be:

[ -x /etc/ppp/${0}.${1} ] && /etc/ppp/${0}.${1} "$@"
[ -x /etc/ppp/${0}.${1/0} ] && /etc/ppp/${0}.${1/0} "$@"
[ -x /etc/ppp/${0}.local ] && /etc/ppp/${0}.local "$@"

this way we have the script for the interface: ippp0, for the interface type: ippp and for all interfaces: local

what is needed to make these changes?
patches to baselayout and changing ppp and isdn4k-utils ebuilds to have the same file?
Comment 12 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-28 08:39:48 UTC
you 3-way sourcing seams reasonable. I would go for it.

1. ip-{up,down} with some comments (beautified) should go into baselayout
2. a sample ip-{up,down}.local could also be part of baselayout (but is not needed in general, if we place some good comments into ip-{up,down}
3. ppp installs a sample ip-{up,down}.ppp0
4. isdn4k-utils installs a sample ip-{up,down}.ippp0

no conflicts anymore, simple and slick solution!
Comment 13 Stefan Schweizer (RETIRED) gentoo-dev 2005-01-28 08:48:43 UTC
if you leave out the "0"s at the end I would be ok with it, do you want to attach
porperly commented init-scripts?

baselayout maintainers:
Can we please add /etc/ppp/ip-up to the baselayout so that we can avoid a conflict for that file? (isdn4k-utils,ppp)
Comment 14 Roy Marples (RETIRED) gentoo-dev 2005-01-31 08:48:23 UTC
Why not create a new ebuild called say net-dialup/ppp-base which is responsible for /etc/ppp and have net-dialup/ppp and net-dialup/isdn4k-utils depend on it?

I see no reason for any ppp related stuff like this to be in baselayout - unless someone can convince me otherwise ;)
Comment 15 Stefan Briesenick (RETIRED) gentoo-dev 2005-01-31 09:19:44 UTC
a 'base'-package would also be ok. But we need some kind of "connection" to the /etc/conf.d/net configuration. It should be somehow possible to restore the original default-route after disconnect.
Comment 16 Alin Năstac (RETIRED) gentoo-dev 2005-01-31 10:29:28 UTC
a new ebuild for a couple of lousy scrips? please!

these scripts are used only by pppd so they should get installed by net-dialup/pppd. If no one have objections, I will put net-dialup/ppp in isdn4k-utils RDEPEND. speak now or forever keep your peace!
Comment 17 Stefan Briesenick (RETIRED) gentoo-dev 2005-02-01 15:49:49 UTC
no problem.
Comment 18 Alin Năstac (RETIRED) gentoo-dev 2005-02-06 01:44:58 UTC
ebuild modified