summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSteven Shiau <steven@nchc.org.tw>2012-08-14 20:57:17 +0200
committerDaniel Baumann <daniel@debian.org>2012-08-14 20:57:17 +0200
commitab6364da036b4b09c0e5c92b0e21c4d43e4bd4c2 (patch)
tree033d0ce52d6d36ffbc0108224e12fefab81a9aa1
parent6f81ca95930688ac8fc9fb7409f91015083fc832 (diff)
downloadlive-boot-ab6364da036b4b09c0e5c92b0e21c4d43e4bd4c2.tar.gz
live-boot-ab6364da036b4b09c0e5c92b0e21c4d43e4bd4c2.zip
Adding support for nameserver in ip= boot parameter.
-rwxr-xr-xscripts/boot/9990-netbase.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/boot/9990-netbase.sh b/scripts/boot/9990-netbase.sh
index c11b9df..384f3f6 100755
--- a/scripts/boot/9990-netbase.sh
+++ b/scripts/boot/9990-netbase.sh
@@ -16,6 +16,7 @@ Netbase ()
log_begin_msg "Preconfiguring networking"
IFFILE="/root/etc/network/interfaces"
+ DNSFILE="/root/etc/resolv.conf"
if [ "${STATICIP}" = "frommedia" ] && [ -e "${IFFILE}" ]
then
@@ -43,6 +44,7 @@ EOF
ifaddress="$(echo ${ifline} | cut -f2 -d ':')"
ifnetmask="$(echo ${ifline} | cut -f3 -d ':')"
ifgateway="$(echo ${ifline} | cut -f4 -d ':')"
+ nameserver="$(echo ${ifline} | cut -f5 -d ':')"
cat >> "${IFFILE}" << EOF
allow-hotplug ${ifname}
@@ -60,6 +62,15 @@ cat >> "${IFFILE}" << EOF
EOF
fi
+
+ if [ -n "${nameserver}" ]
+ then
+
+cat >> "${DNSFILE}" << EOF
+nameserver ${nameserver}
+EOF
+
+ fi
done
else
if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]