X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Fpatches%2F26_support_dns_bootoption.patch;h=aad51f1418b3c32cd6f766f9f1e92b61ca53328b;hb=79dceecf978c589cb7d2bdab92fdb1a2664b93c8;hp=3df83d70fc0ed3c535037f84ee39a078943af363;hpb=6ac1aac5fcd96ce1e986e64884bd8c16a7aa9ea8;p=live-boot-grml.git diff --git a/debian/patches/26_support_dns_bootoption.patch b/debian/patches/26_support_dns_bootoption.patch index 3df83d7..aad51f1 100644 --- a/debian/patches/26_support_dns_bootoption.patch +++ b/debian/patches/26_support_dns_bootoption.patch @@ -5,34 +5,24 @@ ## DP: Support dns bootoption. Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4 @DPATCH@ -Index: b/scripts/live +Index: live-boot-grml/scripts/boot/9990-networking.sh =================================================================== ---- a/scripts/live 2011-07-24 22:08:11.000000000 +0200 -+++ b/scripts/live 2011-07-24 22:08:13.000000000 +0200 -@@ -77,6 +77,18 @@ - BOOTIF="${x#BOOTIF=}" - ;; +--- live-boot-grml.orig/scripts/boot/9990-networking.sh 2013-08-15 08:01:43.007980354 +0200 ++++ live-boot-grml/scripts/boot/9990-networking.sh 2013-08-15 08:01:43.007980354 +0200 +@@ -152,7 +152,7 @@ + echo "search ${DNSDOMAIN}" >> /etc/resolv.conf + fi -+ dns=*) -+ DNSSERVER="${ARGUMENT#*=}" -+ if echo "${DNSSERVER}" | grep -q , ; then -+ DNSSERVER1="${DNSSERVER%,*}" -+ DNSSERVER2="${DNSSERVER#*,}" -+ export DNSSERVER1 DNSSERVER2 -+ else -+ DNSSERVER1="$DNSSERVER" -+ export DNSSERVER1 -+ fi -+ unset DNSSERVER -+ ;; - debug) - DEBUG="Yes" - export DEBUG -Index: b/scripts/live-bottom/23networking_grml +- 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/scripts/boot/9990-grml-networking.sh =================================================================== ---- a/scripts/live-bottom/23networking_grml 2011-07-24 22:08:07.000000000 +0200 -+++ b/scripts/live-bottom/23networking_grml 2011-07-24 22:08:13.000000000 +0200 -@@ -44,7 +44,12 @@ +--- live-boot-grml.orig/scripts/boot/9990-grml-networking.sh 2013-08-15 08:01:43.007980354 +0200 ++++ live-boot-grml/scripts/boot/9990-grml-networking.sh 2013-08-15 08:01:43.007980354 +0200 +@@ -28,7 +28,12 @@ # prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf) IFFILE="/root/etc/network/interfaces" @@ -46,11 +36,10 @@ Index: b/scripts/live-bottom/23networking_grml # config for loopback networking cat > $IFFILE << EOF -@@ -105,3 +110,17 @@ - +@@ -90,4 +95,18 @@ echo>> $IFFILE done -+ + +# dns bootoption +if [ -n "$DNSSERVER1" ] +then @@ -64,3 +53,29 @@ Index: b/scripts/live-bottom/23networking_grml + echo "nameserver $i" >> $RESOLVCONF + done +fi ++ + } +Index: live-boot-grml/scripts/boot/9990-cmdline-old +=================================================================== +--- live-boot-grml.orig/scripts/boot/9990-cmdline-old 2013-08-15 08:01:43.007980354 +0200 ++++ live-boot-grml/scripts/boot/9990-cmdline-old 2013-08-15 08:01:43.007980354 +0200 +@@ -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