Always honor the "nodhcp" boot option
authorChristian Hofstaedtler <ch@grml.org>
Tue, 7 Dec 2010 13:24:43 +0000 (14:24 +0100)
committerChristian Hofstaedtler <ch@grml.org>
Tue, 7 Dec 2010 13:24:43 +0000 (14:24 +0100)
Thanks to Ulrich Dangel for the patch.

debian/patches/00list
debian/patches/16_always_honor_nodhcp.dpatch [new file with mode: 0755]

index 8115311..7cb969e 100644 (file)
@@ -9,3 +9,4 @@
 13_always_display_warnings_and_failures.dpatch
 14_no_blkid_on_lenny.dpatch
 15_remove_resolv_conf_symlink.dpatch
+16_always_honor_nodhcp.dpatch
diff --git a/debian/patches/16_always_honor_nodhcp.dpatch b/debian/patches/16_always_honor_nodhcp.dpatch
new file mode 100755 (executable)
index 0000000..80a2522
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 16_always_honor_nodhcp.dpatch by Ulrich Dangel<mru@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Always honor the nodhcp boot option
+
+@DPATCH@
+
+diff --git a/scripts/live b/scripts/live
+index d79beed..0b698de 100755
+--- a/scripts/live
++++ b/scripts/live
+@@ -83,7 +83,8 @@ Arguments ()
+                               ;;
+                       nodhcp)
+-                              unset DHCP
++                              NODHCP="Yes"
++                              export NODHCP
+                               ;;
+                       ethdevice=*)
+diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking
+index 9554b77..a29df57 100755
+--- a/scripts/live-bottom/23networking
++++ b/scripts/live-bottom/23networking
+@@ -79,7 +79,7 @@ fi
+       done
+ else
+-      if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
++      if ( [ -z "${NETBOOT}" ] && [ -z "${NODHCP}" ] ) || [ -n "${DHCP}" ]
+       then
+               # default, dhcp assigned
+               method="dhcp"