X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=debian%2Fpatches%2F26_support_dns_bootoption.patch;h=0da7f733199f794d9e8ec195cd6542f1672f43c9;hb=8acc92809505421d076ac8f68de81b6bcf79f8db;hp=f79d9622fb18227c5386f3e97d270d273c8f63db;hpb=8424e93b27a3c5ae551ff1a5c456d0de96fc67c8;p=live-boot-grml.git diff --git a/debian/patches/26_support_dns_bootoption.patch b/debian/patches/26_support_dns_bootoption.patch old mode 100755 new mode 100644 index f79d962..0da7f73 --- a/debian/patches/26_support_dns_bootoption.patch +++ b/debian/patches/26_support_dns_bootoption.patch @@ -5,15 +5,29 @@ ## DP: Support dns bootoption. Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4 @DPATCH@ -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' live-boot-grml~/scripts/live live-boot-grml/scripts/live ---- live-boot-grml~/scripts/live 2011-05-03 17:03:57.483541293 +0200 -+++ live-boot-grml/scripts/live 2011-05-03 17:03:57.576874626 +0200 -@@ -73,6 +73,18 @@ - export DEFCONSOLE +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="${ARGUMENT#*=}" ++ DNSSERVER="${_PARAMETER#*=}" + if echo "${DNSSERVER}" | grep -q , ; then + DNSSERVER1="${DNSSERVER%,*}" + DNSSERVER2="${DNSSERVER#*,}" @@ -24,41 +38,7 @@ diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' + fi + unset DNSSERVER + ;; - debug) - DEBUG="Yes" - export DEBUG -diff -urNad '--exclude=CVS' '--exclude=.svn' '--exclude=.git' '--exclude=.arch' '--exclude=.hg' '--exclude=_darcs' '--exclude=.bzr' live-boot-grml~/scripts/live-bottom/23networking_grml live-boot-grml/scripts/live-bottom/23networking_grml ---- live-boot-grml~/scripts/live-bottom/23networking_grml 2011-05-03 17:03:57.426874629 +0200 -+++ live-boot-grml/scripts/live-bottom/23networking_grml 2011-05-03 17:05:11.820206602 +0200 -@@ -44,7 +44,12 @@ - - # prepare a new /etc/network/interfaces file (and, possibly, a new /etc/resolv.conf) - IFFILE="/root/etc/network/interfaces" --RESOLVCONF="/root/etc/resolv.conf" -+if [ -L /root/etc/resolv.conf ] ; then -+ # assume we have resolvconf -+ RESOLVCONF=/root/etc/resolvconf/resolv.conf.d/base -+else -+ RESOLVCONF="/root/etc/resolv.conf" -+fi - - # config for loopback networking - cat > $IFFILE << EOF -@@ -105,3 +110,17 @@ - - echo>> $IFFILE - done + -+# dns bootoption -+if [ -n "$DNSSERVER1" ] -+then -+ # disable any existing entries -+ if [ -r $RESOLVCONF ] -+ then -+ sed -i 's/nameserver/# nameserver/' $RESOLVCONF -+ fi -+ for i in $DNSSERVER1 $DNSSERVER2 -+ do -+ echo "nameserver $i" >> $RESOLVCONF -+ done -+fi + bootid=*) + BOOTID="${_PARAMETER#bootid=}" + export BOOTID