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

Re: Network broken by dhclient on network boot



And a patch that resolves the issue.

Applies on top of the iso/iscsi patches.
--- usr/share/initramfs-tools/scripts/live.orig	2009-11-04 16:31:29.000000000 +0100
+++ usr/share/initramfs-tools/scripts/live	2009-11-04 16:51:55.000000000 +0100
@@ -699,8 +699,6 @@
 
 do_netsetup ()
 {
-	rc=1
-
 	modprobe -q af_packet # For DHCP
 
 	if [ -x /sbin/udevadm ]
@@ -746,10 +744,12 @@
 		NFSROOT=${ROOTSERVER}:${ROOTPATH}
 	fi
 
-	if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] ) && do_httpmount
+	rc=1
+
+	if ( [ -n "${FETCH}" ] || [ -n "${HTTPFS}" ] || [ -n "${FTPFS}" ] )
 	then
-		rc=0
-		return ${rc}
+		do_httpmount
+		return $?
 	fi
 
 	if [ "${NFSROOT#*:}" = "${NFSROOT}" ] && [ "$NETBOOT" != "cifs" ]
@@ -813,6 +813,8 @@
 	else
 		panic "Failed to locate iSCSI host in /sys"
 	fi
+	NETBOOT="iscsi"
+	export NETBOOT
 }
 
 do_httpmount ()
@@ -889,6 +891,9 @@
 			rmdir "${ext_mountpoint}"
 		fi
 		umount "${mountpoint}"
+	elif [ "${webfile}"  != "FETCH" ] ; then
+		NETBOOT="${webfile}"
+		export NETBOOT
 	fi
 
 	return ${rc}

Reply to: