]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commit
system: Fix for NFS booting with interface config via DHCP
authorTrent Piepho <tpiepho@kymetacorp.com>
Mon, 9 Nov 2015 22:16:49 +0000 (22:16 +0000)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Wed, 18 Nov 2015 21:14:56 +0000 (22:14 +0100)
commit71c75a5ea0e62786d279ef1609f23732bde5acc3
tree22abeb88eb57931af5e35cd53167ec4cfff7db1a
parentb981df4fcee131b19c8f3e06489485346d38e942
system: Fix for NFS booting with interface config via DHCP

Configuring the network interface with DHCP via
/etc/network/interfaces generally does not work when NFS booting.  The
DHCP configuration will initially bring the interface down and system
then hangs at that point as the root filesystem is no longer
accessable.

This adds a script to be run via a pre-up line in
/etc/network/interfaces.  It checks for a NFS root filesystem and if
the interface to be configured is used for access to the NFS server.
If this is the case, then it returns a failure code so that ifup will
not configure the interface.  This works for DHCP and another config
methods (static, bootp, etc.).  This system does detect if the
interface to be configured isn't the one used for NFS and doesn't skip
it when that is the case.

NFS filesystems that aren't the root fs aren't considered.

Fixes bug #4790.

Signed-off-by: Trent Piepho <tpiepho@kymetacorp.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/skeleton/nfs_check [new file with mode: 0755]
package/skeleton/skeleton.mk