From 7f450c201f6aa9434f1dae176882a0ee226fa4cf Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Fri, 27 Jul 2012 13:48:25 +0200 Subject: [PATCH] Support overriding "nodhcp" boot option via "dhcp" --- debian/patches/36_support_dhcp_bootoption.patch | 28 +++++++++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 29 insertions(+) create mode 100644 debian/patches/36_support_dhcp_bootoption.patch diff --git a/debian/patches/36_support_dhcp_bootoption.patch b/debian/patches/36_support_dhcp_bootoption.patch new file mode 100644 index 0000000..fffd18f --- /dev/null +++ b/debian/patches/36_support_dhcp_bootoption.patch @@ -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} diff --git a/debian/patches/series b/debian/patches/series index 92029f4..040ab5c 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -16,3 +16,4 @@ 33_retry_phram.patch 34_ignore_unknown_filesystems.patch 35_fix_findiso_umount.patch +36_support_dhcp_bootoption.patch -- 2.1.4