# NetworkManager vs nfs, ntpclient, etc

## koan

Hello,

I am using NetworkManager to initialise my network interface.  The init.d script does not provide the "net" dependency, and so all the scripts that use "net" get executed out of sequence.

Consequently my nfs shares don't get mounted, and bootup ntp sync does not get executed.

What is the best way to go about getting this to work in a harmonious way with future emerges?  I could get it  to provide something else that the scripts requiring network access could look for.  Or I have seen scripts that have a timeout so that NetworkManager can do its thing before they try and use the network - but these require editing the scripts, and ensuring that future updates don't wipe out the dependencies.

Perhaps given that NetworkManager is masked, it just isn't gentooed enough to integrate?

What is the best approach?

Thanks,

Paul

----------

## didymos

You can specify dependency info in /etc/conf.d/net.  For example, I have this:

```

RC_NEED_br0="net.eth0 net.ath0"

```

There're other ways to control these things.  See /etc/conf.d/net.example.

----------

## koan

So I guess that is saying, don't start br0 until net.eth0 and net.eth1 have completed, and so ultimately the "net" dependency is not provided until br0 completes.

Ok, however, I am not using baselayout, I am using NetworkManager, and NetworkManager doesn't provide "net".

So it appears that "net" dependent scripts are running after NetworkManager, as they don't have NetworkManager as a dependency.  I could change them so they do, but then that needs to be managed with the next emerge update for those scripts.

I must be missing something, because I can't see how a script that initiates the network connections doesn't provide "net".

----------

## didymos

There's a directive you can put in the initscript: provide <whatever>

where <whatever> can be dns,logger,net, etc.

----------

## koan

Yes, but "net" is already provided by net, so this produces an error if put into NetworkManager

----------

## didymos

Well, in that case, you could try modifying the net.lo script so that it recognizes NM as one of it's modules (usually, separate scripts kept in /lib/rcscripts/net).  Might be too much of a pain in the ass, though.

----------

## koan

The answer for me in the end was just to get rid of NetworkManager and add my eth to the boot runlevel.

Pauk

----------

