From 2506a84db53eb95e5616c5b572f82ef4760a773a Mon Sep 17 00:00:00 2001 From: maximilian attems Date: Mon, 31 Mar 2008 22:38:15 +0200 Subject: scripts/functions: fix configure_networking() for multiple interfaces. IPOPTS can be assumed to get passed :::::: and thus configure any possible interface. we have thus also to source the relevant ipconfig output :) based on a patch by Michal Sojka : "If I want several computers to boot from the same ramdisk (with NFS root) and some computers have multiple network interfaces, the DEVICE variable can't be set to a specific value (e.g. eth0). Ipconfig from klibc supports a mode, where DHCP request is sent to all interfaces and the one receiving the first DHCP offer is used. This perfectly suits my needs, but it can't be used with initramfs scripts because the interface name in not known in advance and the DEVICE variable is set to something like ::::::." --- scripts/functions | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'scripts/functions') diff --git a/scripts/functions b/scripts/functions index 0648701..588e324 100644 --- a/scripts/functions +++ b/scripts/functions @@ -304,6 +304,12 @@ configure_networking() ;; esac - # source relevant ipconfig output - . /tmp/net-${DEVICE}.conf + # source ipconfig output + if [ -n "${DEVICE}" ]; then + # source specific bootdevice + . /tmp/net-${DEVICE}.conf + else + # source any interface as not exaclty specified + . /tmp/net-*.conf + fi } -- cgit v1.2.3