restore support for old persistence media
[live-boot-grml.git] / debian / patches / reverts / drop_nameserver_from_ip_option.patch
1 Author: Michael Prokop <mika@grml.org>
2 Date:   Mon Dec 17 16:31:42 CET 2012
3
4     Drop nameserver handling from ip= boot parameter.
5
6 In commit ab6364da036b4b09c0e5c92b0e21c4d43e4bd4c2
7 ("Adding support for nameserver in ip= boot parameter.")
8 Debian's live-boot added support for handling nameserver
9 option inside the ip= boot parameter.
10
11 This violates the ip= handling as documented in
12 https://www.kernel.org/doc/Documentation/filesystems/nfs/nfsroot.txt
13
14 --- a/components/9990-netbase.sh
15 +++ b/components/9990-netbase.sh
16 @@ -44,7 +44,6 @@
17                         ifaddress="$(echo ${ifline} | cut -f2 -d ':')"
18                         ifnetmask="$(echo ${ifline} | cut -f3 -d ':')"
19                         ifgateway="$(echo ${ifline} | cut -f4 -d ':')"
20 -                       nameserver="$(echo ${ifline} | cut -f5 -d ':')"
21  
22  cat >> "${IFFILE}" << EOF
23  allow-hotplug ${ifname}
24 @@ -62,17 +61,6 @@
25  EOF
26  
27                         fi
28 -
29 -                       if [ -n "${nameserver}" ]
30 -                       then
31 -                               if [ -e "${DNSFILE}" ]
32 -                               then
33 -                                       grep -v ^nameserver "${DNSFILE}" > "${DNSFILE}.tmp"
34 -                                       mv "${DNSFILE}.tmp" "${DNSFILE}"
35 -                               fi
36 -
37 -                               echo "nameserver ${nameserver}" >> "${DNSFILE}"
38 -                       fi
39                 done
40         else
41                 if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]