fffd18f78a17a2a6d642ea9897d2668ef0830259
[live-boot-grml.git] / debian / patches / 36_support_dhcp_bootoption.patch
1 --- a/scripts/live
2 +++ b/scripts/live
3 @@ -399,7 +399,7 @@
4  
5         for dev in $devlist ; do
6                 param="$(get_ipconfig_para $dev)"
7 -               if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] ; then
8 +               if [ -n "$NODHCP" ] && [ "$param" = "$dev" ] && [ "$DHCP" != "Force" ] ; then
9                         echo "Ignoring network device $dev due to nodhcp." | tee -a /live-boot.log
10                         continue
11                 fi
12 --- a/scripts/live-bottom/23networking_grml
13 +++ b/scripts/live-bottom/23networking_grml
14 @@ -75,6 +75,14 @@
15          method="manual"
16      fi
17  
18 +    # if boot option "nodhcp" is set but also boot option "dhcp" is
19 +    # set, then dhcp should win over it as we default to dhcp and if
20 +    # nodhcp is used as default boot option but "dhcp" is added then it
21 +    # would be confusing to not get a working network setup
22 +    if [ "$DHCP" = "Force" ] ; then
23 +        method="dhcp"
24 +    fi
25 +
26      cat >> $IFFILE << EOF
27  allow-hotplug ${interface}
28  iface ${interface} inet ${method}