Gentoo Archives: gentoo-dev

From: francis <francis.west@××××××××.com>
To: Gentoo-Dev <gentoo-dev@l.g.o>
Subject: [gentoo-dev] additions to net.ethXX script
Date: Thu, 08 Apr 2004 17:14:51
Message-Id: 1081448160.20216.20.camel@artemis.olympus.ddts.net
1 I have extended the net.eth script so that you can have pre/post scripts
2 on start/stop of a nic, as i couldn't see a sensible way to create a
3 bonded pair or a bridge i thought i would share.
4
5 i extended the config in /etc/conf.d/net to include preup / postup /
6 predown / postdown
7
8 for example!
9
10 iface_br0="192.168.1.1 broadcast 192.168.1.255 netmask 255.255.255.0"
11
12 preup_br0="/etc/network/preup_br0"
13 postup_br0="/etc/network/postup_br0"
14 postdown_br0="/etc/network/postdown_br0"
15
16 those files being scripts, i set them so they are 600 just, they just
17 are simple lists of calls to brctl etc,
18
19 i called them like so /bin/bash ${preup_br0} so they do not need to be
20 +x
21
22 there might be a better way to handle running the script?!
23
24
25 hope this is useful to someone!
26
27 Cheers
28 Francis

Attachments

File name MIME type
net.eth0 text/plain

Replies

Subject Author
Re: [gentoo-dev] additions to net.ethXX script Brian Jackson <iggy@g.o>