On 04/08/10 12:08, Brett Parker wrote:
OK - so network manager, believe it or not, actually fires off the scripts in /etc/network/if-up.d and /etc/network/if-down.d (and the other associated directories in there), so if you check the data that you get in those scripts, match the interface, do a cursory check in the up.d script that it's on $particular_network and then run some ip addr add commands in that script, bob's you're uncle, you're still using network manager, and it's all predictable.
OK, I've been saving this until I have time to try this, but I'm a bit out of my depth...
I've never had to play with the up/down scripts before, but if I get the gist of what you're saying I need to create a new script, say /etc/network/if-up.d/extra-ips, which: (a) checks whether the interface is my LAN card (which appears to be $IFACE, although I don't know what the actual value would be nor can I see how to find out?), then (b) adds the additional IP addresses to that interface, using (I assume) the right combination of parameters to ifconfig.
Does that sound right?