From: Michael Prokop Date: Fri, 26 Jun 2015 12:53:43 +0000 (+0200) Subject: Support dns bootoption. X-Git-Tag: debian/1%20160511~9^2 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=6f465ddc145fb527215865ed042875d231d8dcfd Support dns bootoption. Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4 --- diff --git a/components/9990-cmdline-old b/components/9990-cmdline-old index efb33c1..1549bb4 100755 --- a/components/9990-cmdline-old +++ b/components/9990-cmdline-old @@ -17,7 +17,12 @@ Cmdline_old () BOOTIF=*) BOOTIF="${_PARAMETER#BOOTIF=}" ;; - + dns=*) + DNS=${_PARAMETER#dns=} + DNSSERVERS=$(echo ${DNS} | sed 's/,/ /g') + export DNSSERVERS + unset DNS + ;; dhcp) # Force dhcp even while netbooting # Use for debugging in case somebody works on fixing dhclient diff --git a/components/9990-networking.sh b/components/9990-networking.sh index dbdc913..9613364 100755 --- a/components/9990-networking.sh +++ b/components/9990-networking.sh @@ -151,7 +151,7 @@ do_netsetup () echo "search ${DNSDOMAIN}" >> /etc/resolv.conf fi - for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} + for i in ${IPV4DNS0} ${IPV4DNS1} ${IPV4DNS1} ${DNSSERVERS} do if [ -n "$i" ] && [ "$i" != 0.0.0.0 ] then