return
fi
- # FIXME: stop hardcoding overloading of initramfs-tools functions
- . /scripts/functions
- . /lib/live/boot/9990-initramfs-tools.sh
-
log_begin_msg "Preconfiguring networking"
IFFILE="/root/etc/network/interfaces"
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}
EOF
fi
+
+ if [ -n "${nameserver}" ]
+ then
+ if [ -e "${DNSFILE}" ]
+ then
+ grep -v ^nameserver "${DNSFILE}" > "${DNSFILE}.tmp"
+ mv "${DNSFILE}.tmp" "${DNSFILE}"
+ fi
+
+ echo "nameserver ${nameserver}" >> "${DNSFILE}"
+ fi
done
else
if [ -n "${NODHCP}" ]