# NetworkManager + openrc (baselayout-2)

## duckz

I got the openrc aka baselayout-2 installed and tried to get NetworkManager to work but everytime I tried to load it it would load then crashed.

So anybody successfully uses NetworkManager with baselayout-2 and would like to share the step of configuring it??/

----------

## ppurka

I have networkmanager working fine with baselayout2. 

At present I don't have a /etc/conf.d/net file.  Additionally I have rc_plug_services="!net.eth*" set in /etc/rc.conf.

----------

## duckz

ppurka : do you need the NetworkManagerDispatcher script in /etc/init.d ?

----------

## ppurka

 *duckz wrote:*   

> ppurka : do you need the NetworkManagerDispatcher script in /etc/init.d ?

 It is present in /etc/init.d, but it is not running.  BTW, this is my rc-status output.

```
~> rc-status         

Runlevel: default

 metalog                                                                               [  started  ]

 acpid                                                                                 [  started  ]

 dbus                                                                                  [  started  ]

 hald                                                                                  [  started  ]

 netmount                                                                              [  started  ]

 hdapsd                                                                                [  started  ]

 laptop_mode                                                                           [  started  ]

 alsasound                                                                             [  started  ]

 cupsd                                                                                 [  started  ]

 NetworkManager                                                                        [  started  ]

 local                                                                                 [  started  ]

Runlevel: UNASSIGNED

 dhcdbd                                                                                [  started  ]

 mdnsd                                                                                 [  started  ]

 mDNSResponderPosix                                                                    [  started  ]
```

I know that dhcdbd is used by Networkmanager, but probably the others are also required by Networkmanager.

----------

## duckz

Finally. I got it running thx ppurka.

and I use NetworkManagerDispatcher to load ntp-client after NetworkManager get internet connection

/etc/NetworkManager/dispatcher.d/50-ntp-client :

```
#!/bin/bash

/etc/init.d/ntp-client status | grep -q "started"

if test "$2" == "up" -a "$?" != "0" ; then

        rc-config start ntp-client

else

        rc-config stop ntp-client

fi

```

works perfectly....

----------

## ppurka

 *duckz wrote:*   

> Finally. I got it running thx ppurka.
> 
> and I use NetworkManagerDispatcher to load ntp-client after NetworkManager get internet connection
> 
> /etc/NetworkManager/dispatcher.d/50-ntp-client :
> ...

 Hey, that's a nice script you have there! I have been wanting something like this for quite sometime. Thanks!!

----------

## duckz

ppurka : I got the script from the net. I think from gentoo-wiki.

hey do you know how to autoload cpufreq-ondemand, speedstep-centrino and toshiba_acpi modules using baselayout-2?

----------

## Jeffrey0

 *duckz wrote:*   

> hey do you know how to autoload cpufreq-ondemand, speedstep-centrino and toshiba_acpi modules using baselayout-2?

 

Add something like

```
modules_2_6="cpufreq-ondemand speedstep-centrino toshiba_acpi"
```

to /etc/conf.d/modules and make sure that "modules" is in the boot runlevel (should be by default).

----------

## duckz

great! now i can load the module automagically upon boot.

----------

