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 Aug 21, 2015
1 parent da50dd4 commit 6f465dd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion components/9990-cmdline-old
Expand Up @@ -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
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} ${DNSSERVERS}
do
if [ -n "$i" ] && [ "$i" != 0.0.0.0 ]
then
Expand Down

0 comments on commit 6f465dd

Please sign in to comment.