Support overriding "nodhcp" boot option via "dhcp"
authorMichael Prokop <mika@grml.org>
Fri, 27 Jul 2012 11:48:25 +0000 (13:48 +0200)
committerMichael Prokop <mika@grml.org>
Fri, 27 Jul 2012 11:48:25 +0000 (13:48 +0200)
debian/patches/36_support_dhcp_bootoption.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/36_support_dhcp_bootoption.patch b/debian/patches/36_support_dhcp_bootoption.patch
new file mode 100644 (file)
index 0000000..fffd18f
--- /dev/null
@@ -0,0 +1,28 @@
+--- a/scripts/live
++++ b/scripts/live
+@@ -399,7 +399,7 @@
+       for dev in $devlist ; do
+               param="$(get_ipconfig_para $dev)"
+-              if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then
++              if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] && [ "$DHCP" != "Force" ] ; then
+                       echo "Ignoring network device $dev due to nodhcp." | tee -a /live-boot.log
+                       continue
+               fi
+--- a/scripts/live-bottom/23networking_grml
++++ b/scripts/live-bottom/23networking_grml
+@@ -75,6 +75,14 @@
+         method="manual"
+     fi
++    # if boot option "nodhcp" is set but also boot option "dhcp" is
++    # set, then dhcp should win over it as we default to dhcp and if
++    # nodhcp is used as default boot option but "dhcp" is added then it
++    # would be confusing to not get a working network setup
++    if [ "$DHCP" = "Force" ] ; then
++        method="dhcp"
++    fi
++
+     cat >> $IFFILE << EOF
+ allow-hotplug ${interface}
+ iface ${interface} inet ${method}
index 92029f4..040ab5c 100644 (file)
@@ -16,3 +16,4 @@
 33_retry_phram.patch
 34_ignore_unknown_filesystems.patch
 35_fix_findiso_umount.patch
+36_support_dhcp_bootoption.patch