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:


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

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.


, , ,

  1. #1 by Florian Klink on July 18, 2010 - 9:14 am


    really great plugin, I am using it now on my laptop!

    But it has problems when saving a connection to an Access Point with an “-” in it’s SSID.

    Is there a way to escape “-” or is it a bug of the conf.d/net file?


    • #2 by qiaomuf on July 18, 2010 - 2:58 pm

      Is it an underline or a minus? Minus sign works properly on my machine.

      If it’s an underline, it’s true that the plug-in could not work right now. The reason is that underline is used as a delimiter in /etc/conf.d/net.

      • #3 by Florian Klink on July 27, 2010 - 2:36 am

        your right, now it works… i’m confused 😉

        Another problem is that in my init scripts I have some scripts that need internet access and simply fail when there is no access yet. (E.g. aiccu or ntpdate)

        Is there a way to make openrc “know” when a connection is established?
        Then the NetworkManage init script can say that NetworkManager is “inactive” as default, and after successfull connection (event from your plugin?) “started”.

        Then I could make aiccu and ntpdate depend on NetworkManager, and they will be started after internet access (or 60 second timeout).

        I’m not very familiar with openrc and don’t know if it is possible like that, but a similiar procedure is inside net.ppp0. When you make services depend on net.ppp0, they are only started after connection is active.

        I hope you have an idea how to realize this!

  2. #4 by user99 on July 18, 2010 - 9:21 pm

    NetworkManager is terrible. It connects and disconnects over and over. If I manage my connection with the startup scripts it works and stays connected. I like it’s interface and it does have nice features and will a great app perhaps one day. But for my wlan0 init scripts are hands down a better option

    /*Linux 2.34.1 on AMD64 3200 KM800 -wlan0 p54-SMC2802W*/
    /*Gnome 2.30.* NVIDIA 7600 512MB */

  3. #6 by filmy porno on July 27, 2010 - 3:09 am

    Valuable information and excellent design you got here! I would like to thank you for sharing your thoughts and time into the stuff you post!! Thumbs up

  4. #7 by best business cash advance on July 26, 2013 - 1:01 am

    Fine way of telling, and good article to get information about my presentation subject matter,
    which i am going to deliver in institution of higher education.

  1. Links 30/6/2010: Cisco’s Linux Machines; Npad | Techrights
  2. Motorola on Target for a Turnaround | Apple Product Tips And App News
  3. Court grants bail to jailed ex-press baron Black | Apple Product Tips And App News
  4. Boeing, Airbus ink orders at U.K. airshow | Apple Product Tips And App News
  5. Market, stockholders drive Motorola breakup | Apple Product Tips And App News
  6. Research In Motion: Doomed? | Apple Product Tips And App News

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: