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

Bug#584583: initramfs-tools: configure_networking function: repeatedly makes DHCP requests



thanks to Petter Reinholdtsen, i think i've figured out the initramfs-tools
portion of this problem (there may still be outstanding issues with ipconfig).

tested the attached patch, which seems to address the issue for me at least.

live well,
  vagrant
commit 71e197686aa9048633dac7f853a74ecbf6ac6d4a
Author: Vagrant Cascadian <vagrant@freegeek.org>
Date:   Fri Aug 20 12:35:43 2010 -0700

    configure_networking function: Look for presence of /tmp/net-*.conf files when
    $DEVICE is not set (which is now default), otherwise ipconfig may receive a
    valid DHCP response, but fails to break out of the loop and is called
    repeatedly.
    
    Closes: #584583

diff --git a/scripts/functions b/scripts/functions
index 1e2aeee..c497ffa 100644
--- a/scripts/functions
+++ b/scripts/functions
@@ -372,9 +372,11 @@ configure_networking()
 		# The NIC is to be configured if this file does not exist.
 		# Ip-Config tries to create this file and when it succeds
 		# creating the file, ipconfig is not run again.
-		if [ -e /tmp/net-"${DEVICE}".conf ]; then
-			break;
-		fi
+		for x in /tmp/net-"${DEVICE}".conf /tmp/net-*.conf ; do
+			if [ -e "$x" ]; then
+				break 2
+			fi
+		done
 
 		case ${IP} in
 		none|off)

Reply to: