consolidate network related patches into 15_networking_grml.patch
authorEvgeni Golov <evgeni@golov.de>
Sat, 8 Mar 2014 15:40:01 +0000 (16:40 +0100)
committerEvgeni Golov <evgeni@golov.de>
Sat, 8 Mar 2014 15:40:01 +0000 (16:40 +0100)
11_dhcphostname.patch, 16_nodhcp.patch and 36_support_dhcp_bootoption.patch
would not work without it anyways.

moved grml-specific code from 26_support_dns_bootoption.patch to 15_networking_grml.patch

debian/patches/11_dhcphostname.patch [deleted file]
debian/patches/15_networking_grml.patch
debian/patches/16_nodhcp.patch [deleted file]
debian/patches/26_support_dns_bootoption.patch
debian/patches/36_support_dhcp_bootoption.patch [deleted file]
debian/patches/series

diff --git a/debian/patches/11_dhcphostname.patch b/debian/patches/11_dhcphostname.patch
deleted file mode 100644 (file)
index 65b72be..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 11_dhcphostname.dpatch by Andreas Thienemann <andreas@bawue.net>
-## and Michael Prokop <mika@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Support disabling setting hostname via DNS info
-
-@DPATCH@
-
-Support 'nodhcphostname' option which will disable setting the
-hostname of the booted system according to the DNS information.
-This patch takes care of the netboot case.
-
-Index: live-boot-grml/components/9990-cmdline-old
-===================================================================
---- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 13:21:20.186833068 +0100
-+++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:21:20.182833537 +0100
-@@ -140,6 +140,11 @@
-                               export NFS_COW
-                               ;;
-+                      nodhcphostname)
-+                              NODHCPHOSTNAME="Yes"
-+                              export NODHCPHOSTNAME
-+                              ;;
-+
-                       nofstab)
-                               NOFSTAB="true"
-                               export NOFSTAB
index 7de1883..510f84a 100644 (file)
@@ -12,8 +12,8 @@ diff a/scripts/live-bottom/23networking_grml b/scripts/live-bottom/23networking_
 Index: live-boot-grml/components/9990-grml-networking.sh
 ===================================================================
 --- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ live-boot-grml/components/9990-grml-networking.sh  2014-03-08 13:26:53.959682953 +0100
-@@ -0,0 +1,93 @@
++++ live-boot-grml/components/9990-grml-networking.sh  2014-03-08 16:34:29.800254396 +0100
+@@ -0,0 +1,120 @@
 +#!/bin/sh
 +
 +#set -e
@@ -44,7 +44,12 @@ Index: live-boot-grml/components/9990-grml-networking.sh
 +
 +# prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf)
 +IFFILE="/root/etc/network/interfaces"
-+RESOLVCONF="/root/etc/resolv.conf"
++if [ -L /root/etc/resolv.conf ] ; then
++  # assume we have resolvconf
++  RESOLVCONF=/root/etc/resolvconf/resolv.conf.d/base
++else
++  RESOLVCONF="/root/etc/resolv.conf"
++fi
 +
 +# config for loopback networking
 +cat > $IFFILE << EOF
@@ -70,6 +75,14 @@ Index: live-boot-grml/components/9990-grml-networking.sh
 +        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" = "true" ] ; then
++        method="dhcp"
++    fi
++
 +    cat >> $IFFILE << EOF
 +allow-hotplug ${interface}
 +iface ${interface} inet ${method}
@@ -106,11 +119,25 @@ Index: live-boot-grml/components/9990-grml-networking.sh
 +    echo>> $IFFILE
 +done
 +
++# dns bootoption
++if [ -n "$DNSSERVER1" ]
++then
++      # disable any existing entries
++      if [ -r $RESOLVCONF ]
++      then
++              sed -i 's/nameserver/# nameserver/' $RESOLVCONF
++      fi
++      for i in $DNSSERVER1 $DNSSERVER2
++      do
++              echo "nameserver $i" >> $RESOLVCONF
++      done
++fi
++
 +}
 Index: live-boot-grml/components/9990-main.sh
 ===================================================================
---- live-boot-grml.orig/components/9990-main.sh        2014-03-08 13:26:53.963682483 +0100
-+++ live-boot-grml/components/9990-main.sh     2014-03-08 13:26:53.959682953 +0100
+--- live-boot-grml.orig/components/9990-main.sh        2014-03-08 16:27:40.668243817 +0100
++++ live-boot-grml/components/9990-main.sh     2014-03-08 16:27:40.664244286 +0100
 @@ -195,6 +195,8 @@
  
        Swap
@@ -120,3 +147,28 @@ Index: live-boot-grml/components/9990-main.sh
        case "${UNIONFS}" in
                unionfs-fuse)
                        umount "${rootmnt}/dev"
+Index: live-boot-grml/components/9990-cmdline-old
+===================================================================
+--- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 16:27:34.117012248 +0100
++++ live-boot-grml/components/9990-cmdline-old 2014-03-08 16:33:20.536378749 +0100
+@@ -33,6 +33,8 @@
+                       nodhcp)
+                               DHCP=""
+                               export DHCP
++                              NODHCP="Yes"
++                              export NODHCP
+                               ;;
+                       ethdevice=*)
+@@ -150,6 +152,11 @@
+                               export NFS_COW
+                               ;;
++                      nodhcphostname)
++                              NODHCPHOSTNAME="Yes"
++                              export NODHCPHOSTNAME
++                              ;;
++
+                       nofstab)
+                               NOFSTAB="true"
+                               export NOFSTAB
diff --git a/debian/patches/16_nodhcp.patch b/debian/patches/16_nodhcp.patch
deleted file mode 100644 (file)
index a50cf82..0000000
+++ /dev/null
@@ -1,21 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 16_nodhcp.dpatch by Ulrich Dangel <mru@grml.org>
-##
-## All lines beginning with `## DP:' are a description of the patch.
-## DP: Handle explicit "nodhcp"
-
-@DPATCH@
-
-Index: live-boot-grml/components/9990-cmdline-old
-===================================================================
---- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 13:28:01.059812396 +0100
-+++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:28:01.055812866 +0100
-@@ -33,6 +33,8 @@
-                       nodhcp)
-                               DHCP=""
-                               export DHCP
-+                              NODHCP="Yes"
-+                              export NODHCP
-                               ;;
-                       ethdevice=*)
index 1e17c3e..0da7f73 100644 (file)
@@ -18,43 +18,6 @@ Index: live-boot-grml/components/9990-networking.sh
                        do
                                if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
                                then
-Index: live-boot-grml/components/9990-grml-networking.sh
-===================================================================
---- live-boot-grml.orig/components/9990-grml-networking.sh     2014-03-08 13:33:11.615385566 +0100
-+++ live-boot-grml/components/9990-grml-networking.sh  2014-03-08 13:33:11.611386038 +0100
-@@ -28,7 +28,12 @@
- # prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf)
- IFFILE="/root/etc/network/interfaces"
--RESOLVCONF="/root/etc/resolv.conf"
-+if [ -L /root/etc/resolv.conf ] ; then
-+  # assume we have resolvconf
-+  RESOLVCONF=/root/etc/resolvconf/resolv.conf.d/base
-+else
-+  RESOLVCONF="/root/etc/resolv.conf"
-+fi
- # config for loopback networking
- cat > $IFFILE << EOF
-@@ -90,4 +95,18 @@
-     echo>> $IFFILE
- done
-+# dns bootoption
-+if [ -n "$DNSSERVER1" ]
-+then
-+      # disable any existing entries
-+      if [ -r $RESOLVCONF ]
-+      then
-+              sed -i 's/nameserver/# nameserver/' $RESOLVCONF
-+      fi
-+      for i in $DNSSERVER1 $DNSSERVER2
-+      do
-+              echo "nameserver $i" >> $RESOLVCONF
-+      done
-+fi
-+
- }
 Index: live-boot-grml/components/9990-cmdline-old
 ===================================================================
 --- live-boot-grml.orig/components/9990-cmdline-old    2014-03-08 13:33:11.615385566 +0100
diff --git a/debian/patches/36_support_dhcp_bootoption.patch b/debian/patches/36_support_dhcp_bootoption.patch
deleted file mode 100644 (file)
index ad416e3..0000000
+++ /dev/null
@@ -1,17 +0,0 @@
---- a/components/9990-grml-networking.sh
-+++ b/components/9990-grml-networking.sh
-@@ -59,6 +59,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" = "true" ] ; then
-+        method="dhcp"
-+    fi
-+
-     cat >> $IFFILE << EOF
- allow-hotplug ${interface}
- iface ${interface} inet ${method}
index da9db4d..6bfd3cb 100644 (file)
@@ -1,11 +1,9 @@
 grml-specific/grml_version_file_hook.patch
 grml-specific/boot_failure_message_grml.patch
 grml-specific/grml_defaults.patch
-11_dhcphostname.patch
 12_uuid_support.patch
 13_always_display_warnings_and_failures.patch
 15_networking_grml.patch
-16_nodhcp.patch
 reverts/revert_toram_bootoption_to_expected_behaviour.patch
 26_support_dns_bootoption.patch
 27_support_static_ip.patch
@@ -14,7 +12,6 @@ grml-specific/package_rename.patch
 32_add_kms.patch
 33_retry_phram.patch
 34_ignore_unknown_filesystems.patch
-36_support_dhcp_bootoption.patch
 39_persistence_with_forensic.patch
 40_support_multiple_hooks.patch
 reverts/drop_nameserver_from_ip_option.patch