1 #! /bin/sh /usr/share/dpatch/dpatch-run
2 ## 09_fix_resolvconf_pxeboot.dpatch by Michael Prokop <mika@grml.org>
4 ## All lines beginning with `## DP:' are a description of the patch.
5 ## DP: fix resolvconf handling when booting via PXE
7 ## When installing grml for PXE boot the system has network after
8 ## boot but no usable DNS. /etc/resolv.conf is empty except the
9 ## warning to not edit this file manually but to use the resolvconf
12 ## The problem is, that the 23networking scripte in the initrd
13 ## correctly creates the resolv.conf, but it's being overwritten by
14 ## the resolvconf utility on boot.
16 ## The fix for now is to remove the symlink so resolvconf breaks
17 ## early and DNS is working then.
20 diff --git a/scripts/live-bottom/23networking b/scripts/live-bottom/23networking
21 index 72aaf12..244eeca 100755
22 --- a/grml/23networking
23 +++ b/grml/23networking
24 @@ -110,6 +110,11 @@ EOF
26 if [ -f /netboot.config ]
28 + if [ -h /root/etc/resolv.conf ]
30 + rm /root/etc/resolv.conf
33 # create a resolv.conf if it is not present or empty
34 cp /netboot.config /root/var/log/netboot.config