Archive for June, 2010

Let NetworkManager work togerther with init scripts

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:

RC_PLUG_SERVICES=”!net.*”

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):

RC_PLUG_SERVICES=”!net.eth0 !net.wlan0″

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
managed_eth1=”false”

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.

, , ,

13 Comments

Gentoo NetworkManager plug-in improvement and next plan

Recently, I’ve received some great advice from several enthusiastic users. I want to say thank you!

I’ve made a few commit since the last version 0.8-r102:

  • Fixed a bug when dealing with default wep key
  • support both dhcpcd and dhclient configuration file
  • support reading dhcp clientid and hostname
  • fixed a bug when dealing with global setting
  • Improved hex and ASCII key differentiating

Several people are confused with baselayout/openrc init scripts when using NetworkManager. It doesn’t matter. I will write another article to explain their relationship and how to make them work together. Actually there’s already one article talking about openrc scirpts.

Now I’d like to let you know my next plan.

Because Gentoo is moving to /etc/conf.d/network, I will try to make the plug-in compatible with it. When the migration is completed, I hope this plug-in will work properly without further modification.

Redhat, Suse and Ubuntu have already pushed their plug-in to upstream NetworkManager. I hope we could do the same thing. I will contact Dan when our plug-in is stable enough. Certainly there may be several good advice from him.

,

11 Comments

Recent Updates for Gentoo NM Plug-in

Hi guys,

I made a few updates for the plug-in these days. Actually there is no big change. It’s because all the planned features have been implemented and all the bugs I encountered have been fixed right now. In addition, I haven’t heard of any bug report currently. It may be good news since it suggests that the plug-in is probably stable right now. However, if you find any problem with this plug-in, please do not hesitate to let me know. I would appreciate if you could give me some feedback.

Anyway, here is the list of updates:

  • fixed a bug in WEP key handling
  • support dhcp hostname
  • support dhcp client id
  • support specifying dhcp client type in nm-system-settings.conf

PS: You have to change your dhcp hostname and client id via dhcpcd/dhclient configuration file. Writing these values back via GUI is not supported currently.

Reiterating, your feedback is very important to me. I really hope to make this project better :-).

,

14 Comments