Fix resolvconf handling when booting via PXE v1.157.1-1grml.06
authorMichael Prokop <mika@grml.org>
Mon, 1 Jun 2009 16:55:01 +0000 (18:55 +0200)
committerMichael Prokop <mika@grml.org>
Mon, 1 Jun 2009 16:55:29 +0000 (18:55 +0200)
debian/changelog
debian/patches/00list
debian/patches/09_fix_resolvconf_pxeboot.dpatch [new file with mode: 0755]

index 754b9bc..4f3060b 100644 (file)
@@ -1,3 +1,21 @@
+live-initramfs (1.157.1-1grml.06) unstable; urgency=low
+
+  * Apply bugfix contributed by Andreas Thienemann <andreas@bawue.net>:
+
+    When installing grml for PXE boot the system has network after
+    boot but no usable DNS. /etc/resolv.conf is empty except the
+    warning to not edit this file manually but to use the resolvconf
+    tool.
+
+    The problem is, that the 23networking scripte in the initrd
+    correctly creates the resolv.conf, but it's being overwritten by
+    the resolvconf utility on boot.
+
+    The fix for now is to remove the symlink so resolvconf breaks
+    early and DNS is working then.
+
+ -- Michael Prokop <mika@grml.org>  Mon, 01 Jun 2009 18:47:01 +0200
+
 live-initramfs (1.157.1-1grml.05) unstable; urgency=low
 
   * Update patch 07_support_findiso.dpatch: make sure to get rid of
index 448be62..4da5b26 100644 (file)
@@ -6,3 +6,4 @@
 06_support_fromiso_isofrom.dpatch
 07_support_findiso.dpatch
 08_readonly_devices.dpatch
+09_fix_resolvconf_pxeboot.dpatch
diff --git a/debian/patches/09_fix_resolvconf_pxeboot.dpatch b/debian/patches/09_fix_resolvconf_pxeboot.dpatch
new file mode 100755 (executable)
index 0000000..e15e21f
--- /dev/null
@@ -0,0 +1,35 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 09_fix_resolvconf_pxeboot.dpatch by Michael Prokop <mika@grml.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: fix resolvconf handling when booting via PXE
+##
+## When installing grml for PXE boot the system has network after
+## boot but no usable DNS. /etc/resolv.conf is empty except the
+## warning to not edit this file manually but to use the resolvconf
+## tool.
+##
+## The problem is, that the 23networking scripte in the initrd
+## correctly creates the resolv.conf, but it's being overwritten by
+## the resolvconf utility on boot.
+##
+## The fix for now is to remove the symlink so resolvconf breaks
+## early and DNS is working then.
+
+@DPATCH@
+diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking
+index 72aaf12..244eeca 100755
+--- a/scripts/live-bottom/23networking
++++ b/scripts/live-bottom/23networking
+@@ -110,6 +110,11 @@ EOF
+       then
+               if [ -f /netboot.config ]
+               then
++                      if [ -h /root/etc/resolv.conf ]
++                      then
++                              rm /root/etc/resolv.conf
++                      fi
++
+                       # create a resolv.conf if it is not present or empty
+                       cp /netboot.config /root/var/log/netboot.config