/
26_support_dns_bootoption.patch
44 lines (41 loc) · 1.52 KB
/
26_support_dns_bootoption.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#! /bin/sh /usr/share/dpatch/dpatch-run
## 26_support_dns_bootoption.dpatch by Michael Prokop <mika@grml.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Support dns bootoption. Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4
@DPATCH@
Index: live-boot-grml/components/9990-networking.sh
===================================================================
--- live-boot-grml.orig/components/9990-networking.sh 2014-03-08 13:33:11.615385566 +0100
+++ live-boot-grml/components/9990-networking.sh 2014-03-08 13:33:11.611386038 +0100
@@ -151,7 +151,7 @@
echo "search ${DNSDOMAIN}" >> /etc/resolv.conf
fi
- for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1}
+ for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVER1} ${DNSSERVER2}
do
if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
then
Index: live-boot-grml/components/9990-cmdline-old
===================================================================
--- live-boot-grml.orig/components/9990-cmdline-old 2014-03-08 13:33:11.615385566 +0100
+++ live-boot-grml/components/9990-cmdline-old 2014-03-08 13:33:11.611386038 +0100
@@ -18,6 +18,19 @@
BOOTIF="${_PARAMETER#BOOTIF=}"
;;
+ dns=*)
+ DNSSERVER="${_PARAMETER#*=}"
+ if echo "${DNSSERVER}" | grep -q , ; then
+ DNSSERVER1="${DNSSERVER%,*}"
+ DNSSERVER2="${DNSSERVER#*,}"
+ export DNSSERVER1 DNSSERVER2
+ else
+ DNSSERVER1="$DNSSERVER"
+ export DNSSERVER1
+ fi
+ unset DNSSERVER
+ ;;
+
bootid=*)
BOOTID="${_PARAMETER#bootid=}"
export BOOTID