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

Bug#452444: Acknowledgement (honor ip=)



Stupid me forgot the patch...

-- 
Anton Lundin	+46702-161604
-------------- next part --------------
--- live	2007-11-22 23:23:30.000000000 +0100
+++ live.ip=	2007-11-22 23:23:11.000000000 +0100
@@ -635,11 +635,37 @@
 	udevtrigger
 	udevsettle
 
-	ipconfig ${DEVICE} | tee /netboot.config
+	case ${IPOPTS} in
+		none|off)
+			# Do nothing
+			;;
+		""|on|any)
+			# Bring up device
+			ipconfig ${DEVICE}| tee /netboot.config
+			;;
+		dhcp|bootp|rarp|both)
+			ipconfig -c ${IPOPTS} -d ${DEVICE}| tee /netboot.config
+			;;
+		*)
+			ipconfig -d $IPOPTS| tee /netboot.config
+
+			# grab device entry from ip option
+			NEW_DEVICE=${IPOPTS#*:*:*:*:*:*}
+			if [ "${NEW_DEVICE}" != "${IPOPTS}" ]; then
+				NEW_DEVICE=${NEW_DEVICE%:*}
+			else
+				# wrong parse, possibly only a partial string
+				NEW_DEVICE=
+			fi
+			if [ -n "${NEW_DEVICE}" ]; then
+				DEVICE="${NEW_DEVICE}"
+			fi
+			;;
+	esac
 
 	# source relevant ipconfig output
 	OLDHOSTNAME=${HOSTNAME}
-	. /tmp/net-${DEVICE}.conf
+	. /tmp/net-*.conf
 	[ -z ${HOSTNAME} ] && HOSTNAME=${OLDHOSTNAME}
 	export HOSTNAME
 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 185 bytes
Desc: not available
Url : http://lists.alioth.debian.org/pipermail/debian-live-devel/attachments/20071122/5cd88195/attachment.pgp 


Reply to: