Re: Using NetworkManger on a target booting on NFS



On Thu, 2010-03-25 at 16:01 +0100, Maxime Boure wrote:
> Hello everyone,
> 
> 
> I am using NetworkManager on a board booting on NFS. When
> NetworkManager begins it kills my connection and the NFS timeout comes
> up.

NM 0.8 supports this case.  To have NM "assume" or "take over" an
existing connection that is present when NM starts, make sure you have a
system connection defined for that device and connection details.  For
example, if the device is configured by the initrd, make sure the initrd
writes out some connection configuration files (either keyfile or
whatever your distro is using) to the right places on the rootfs, or at
least after the root swtiches from the initrd to the main partition, the
rc script can do the copying.

This preserves the ability of the user to do things like ifup/ifdown and
have that work as expected (ie, to recognize that the connection is
already up and not re-up it), and also lets NM know what connection is
actually up at the time NM starts.

For static IP the config should be simple, but for DHCP if you're using
dhclient, NM will check the dhclient leasefile and make sure that the IP
address used on the interface is from valid lease.  In the DHCP case the
initrd should also copy the dhclient leasefile to the right location
in /var/run/.

This support was added to NM specifically for this use-case.  Just
because the connection is made at initrd time doesn't really exempt the
initrd from being a responsible citizen and integrating with your
distro's normal network configuration, at which point NM should pick up
the connection too.

Dan




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]