Gentoo Archives: gentoo-dev

From: Stroller <root@××××××××××××××××××.uk>
To: gentoo-dev@g.o
Subject: Re: [gentoo-dev] Proposal: networking startup script rewrite
Date: Tue, 14 Oct 2003 14:09:31
Message-Id: 05CBF7D9-FE50-11D7-BA49-000A95795F3E@stellar.eclipse.co.uk
In Reply to: Re: [gentoo-dev] Proposal: networking startup script rewrite by "Michael J. Cohen"
1 Having not dug around in the net startup scripts either deeply or
2 recently, I'm not qualified to comment on all your points, but I'll
3 respond to the ones that I can.
4
5
6 On 14 Oct 2003, at 3:17 am, Michael J. Cohen wrote:
7 >
8 > etc-updating 99 files is a pain, but it often happens when upgrading
9 > baselayout, etc. If a user wipes out his configs for iptables etc by
10 > overwriting accidentally, he is in a bind. However if we do not
11 > provide a /
12 > etc/conf.d/net and only a /etc/conf.d/net.sample; this is allievated.
13
14 Yes, I much prefer this format - perhaps it would be extreme or
15 convoluted to have every configuration file provided as config.example,
16 but I would love to see Gentoo standardising on it for all files that
17 the user is likely to change, at least.
18
19
20 >> I'd agree that if a script to call `brctl` appropriately was installed
21 >> by net-misc/bridge-utils then it would make configuration a lot
22 >> easier...
23 >
24 > Currently, there are several unrelated scripts for each userspace
25 > networking
26 > tool. iptables, (your proposed bridge-utils), ipsec...
27
28 Well, my "proposed" bridge-utils isn't "proposed" - it's in the Portage
29 tree. It is the ebuild for "brctl" and the other user-space Bridging
30 utilities.
31
32 > The new system would most likely call the related /etc/init.d/bridge
33 > script or
34 > similar in order to set things up, rather than invoking brctl
35 > directly...
36
37 Erm... well, I rather gathered that the idea of all the separate
38 scripts in /etc/init.d/ was that they could be called independently. In
39 this way they can be added to different runlevels or restarted by the
40 administrator after configuration changes; if one script relies on
41 another there is the "depends" declaration. Would your
42 /etc/init.d/bridge script be safe to call separately like that..?
43
44 I agree that the `brctl` stuff should not be in the main network
45 scripts. I've attached a copy of my *extremely tatty*
46 /etc/init.d/net.br0 script, so that you can see that this can be done
47 fairly elegantly within the current framework. I just copied my default
48 runlevel to /etc/runlevels/bridge, removed the existing eth0 & eth1
49 from that runlevel & added net.br0, so I can switch between them at
50 will.
51
52 Sorry to harp on about it, but if a (much tidier) version of this were
53 distributed with net-misc/bridge-utils then there would be no need at
54 all for the base networking init system to refer to bridging at all; I
55 believe this is much neater for users who are not interested in
56 bridging.
57
58 > This
59 > would save some headaches with updating the script every time we
60 > package up
61 > some new network tool.
62
63 Hmmn... y'see I see smaller scripts as easier to maintain. If one
64 developer wants to change (say) the way that wireless LAN cards behave
65 at init, he simply edits that script without having to know about how
66 bridges behave, or risking fouling up that behavior. Of course, if
67 wireless bridges require special cases, then that's a job for the
68 bridging maintainers (whoever they may be).
69
70 > What about wireless + roaming, advanced routing/bridging, ipsec, vpns,
71 > vlans,
72 > pppoe... all of these things either are not supported or are broken up
73 > into
74 > tiny bits of configuration files everywhere. It would be much easier
75 > if we
76 > had one manual with plenty of examples and one configuration file for
77 > people
78 > to edit. Not only is it easier on the developers, but it is easier on
79 > the
80 > user for updates and for configuration. The user no longer needs to
81 > hunt
82 > down where he made what change to what interface in what file.
83
84 I disagree. I prefer small configuration files; I find smaller files
85 easier to parse & to deal with than larger ones. YMMV. Locating the
86 appropriate configuration file is simply a matter of `ls /etc/conf.d`.
87 For the developers, I would have thought the same applied - they can
88 edit the notworking file they're interested in without risking b0rking
89 up anything else.
90
91 I see the current seup as good modularity, but I appreciate this is a
92 matter of preference.
93
94 >> I don't know much (erm... well, anything) about VLANs, so I'm probably
95 >> missing some of your reasoning against the current system...
96 >
97 > It was mentioned to me that it was quite challenging to add VLAN
98 > suport into
99 > the current net scripts.
100
101 Ok... if you say so. But I don't know why. Would it be easier to add
102 VLAN support to a single net-startup script than to the present
103 setup..? Can you explain why, please..?
104
105 >> .... I once tried parsing one of
106 >> Mandrake's network initialisation scripts, but floundered wildly -
107 >> with
108 >> Gentoo you know intuitively to look for iptables stuff in
109 >> /etc/conf.d/iptables and so on.
110 >
111 > Seems like it would make more sense to me if /etc/conf.d/net was your
112 > one stop
113 > shop for all your networking needs.
114
115 I forgot to explain the reason I had problems with the Mandrake network
116 script I mentioned - because it was so damn big! There were pages of
117 it! On that occasion I was only looking to see how the PPP startup
118 worked - all the pages of Ethernet (and presumably VLAN &c)
119 configuration just confused me impossibly. I now use Ethernet - I have
120 no desire to see PPP options in my configuration scripts.
121
122 At present /etc/conf.d/ is your one stop shop for all your networking
123 needs - and it's split neatly into manageable departments.
124
125 Stroller.

Attachments

File name MIME type
net.br0 application/octet-stream