Skip to content

Commit

Permalink
Support dns bootoption.
Browse files Browse the repository at this point in the history
Usage examples: dns=8.8.8.8 / dns=8.8.8.8,1.2.3.4
  • Loading branch information
mika authored and evgeni committed Jun 26, 2015
1 parent 6e6a672 commit 1782f14
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 1 deletion.
13 changes: 13 additions & 0 deletions components/9990-cmdline-old
Expand Up @@ -18,6 +18,19 @@ Cmdline_old ()
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
Expand Down
2 changes: 1 addition & 1 deletion components/9990-networking.sh
Expand Up @@ -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} ${DNSSERVER1} ${DNSSERVER2}
do
if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
then
Expand Down

0 comments on commit 1782f14

Please sign in to comment.