Add patch to drop nameserver handling from ip= boot parameter
authorMichael Prokop <mika@grml.org>
Mon, 17 Dec 2012 15:33:50 +0000 (16:33 +0100)
committerMichael Prokop <mika@grml.org>
Mon, 17 Dec 2012 15:33:50 +0000 (16:33 +0100)
debian/patches/41_drop_nameserver_from_ip_option.patch [new file with mode: 0644]
debian/patches/series

diff --git a/debian/patches/41_drop_nameserver_from_ip_option.patch b/debian/patches/41_drop_nameserver_from_ip_option.patch
new file mode 100644 (file)
index 0000000..f43cfc4
--- /dev/null
@@ -0,0 +1,41 @@
+Author: Michael Prokop <mika@grml.org>
+Date:   Mon Dec 17 16:31:42 CET 2012
+
+    Drop nameserver handling from ip= boot parameter.
+
+In commit ab6364da036b4b09c0e5c92b0e21c4d43e4bd4c2
+("Adding support for nameserver in ip= boot parameter.")
+Debian's live-boot added support for handling nameserver
+option inside the ip= boot parameter.
+
+This violates the ip= handling as documented in
+https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
+
+--- a/scripts/boot/9990-netbase.sh
++++ b/scripts/boot/9990-netbase.sh
+@@ -44,7 +44,6 @@
+                       ifaddress="$(echo ${ifline} | cut -f2 -d ':')"
+                       ifnetmask="$(echo ${ifline} | cut -f3 -d ':')"
+                       ifgateway="$(echo ${ifline} | cut -f4 -d ':')"
+-                      nameserver="$(echo ${ifline} | cut -f5 -d ':')"
+ cat >> "${IFFILE}" << EOF
+ allow-hotplug ${ifname}
+@@ -62,17 +61,6 @@
+ EOF
+                       fi
+-
+-                      if [ -n "${nameserver}" ]
+-                      then
+-                              if [ -e "${DNSFILE}" ]
+-                              then
+-                                      grep -v ^nameserver "${DNSFILE}" > "${DNSFILE}.tmp"
+-                                      mv "${DNSFILE}.tmp" "${DNSFILE}"
+-                              fi
+-
+-                              echo "nameserver ${nameserver}" >> "${DNSFILE}"
+-                      fi
+               done
+       else
+               if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
index e6cd145..d9b5533 100644 (file)
@@ -17,3 +17,4 @@
 36_support_dhcp_bootoption.patch
 39_persistence_with_forensic.patch
 40_support_multiple_hooks.patch
+41_drop_nameserver_from_ip_option.patch