On 04 Aug 11:00, Mark Rogers wrote:
On 04/08/10 10:44, Adam Bower wrote:
If I want to mangle configuration manually I just tell network manager to disable networking and do whatever I need.
Sounds like that's what I need. But I'm not entirely sure how all the bits fit together.
Do I just right-click on the NM icon and untick "Enable Networking", then go about my business in /etc/network/interfaces, or is there more to it than that?
To me it sounds like you have a reasonably complex setup although I can't necessarily see why it wouldn't work but having a dhcp *and* static setup at the same time really seems a bit... hmmn, well, odd. :)
In my case, it's just that it makes sense to have my "primary" IP address given to me by the office DHCP server - it means we can change settings (eg DNS, etc) globally nice and easily. But I also need to be able to configure hardware which will come in with known default IP addresses, so I will need to be able to reach, for example, 192.168.10.1, regardless of what the rest of the network looks like.
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.
HTH HAND.