I know there are many of you still using init scripts to manage your network. It will be a little confusing when you first migrate to NetworkManager. So I write this article to explain how to deal with baselayout or openrc init scripts.
If you want NM to manage all your network interfaces, it’s quite easy :-). You just need to modify /etc/conf.d/rc like:
This is what I did on my machine. We’re done here and you don’t have to touch any other thing.
But if that’s not the deal, the first thing you have to do is to figure out which interfaces you want init scripts to manage and which interfaces you want NM to manage. For example, you have three interfaces eth0, eth1 and wlan0. You want NM to manage eth0, wlan0 and init scripts to manage eth1. Then you need to disable the interfaces, which NM should take care of, from starting at boot time (/etc/conf.d/rc):
I’m using openrc but if I remember correctly, this is the same for baselayout. On the other hand, you need to disable the interfaces, which init scripts should take care of, from being managed by NM (/etc/conf.d/net):
mac_eth1=”xx:xx:xx:xx:xx:xx” # the mac address of eth1
Then do your necessary configurations. Init scripts and NM will happily work together!
PS: A little modification to init scripts will be made when the plug-in is released. But if you have the requirement right now, I’m sure you can do it by yourself.