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 |