projects
/
live-boot-grml.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
drop patches that were previously backported from the 4.x upstream branch
[live-boot-grml.git]
/
scripts
/
boot
/
9990-netbase.sh
diff --git
a/scripts/boot/9990-netbase.sh
b/scripts/boot/9990-netbase.sh
index
c11b9df
..
b3f886c
100755
(executable)
--- 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"
log_begin_msg "Preconfiguring networking"
IFFILE="/root/etc/network/interfaces"
+ DNSFILE="/root/etc/resolv.conf"
if [ "${STATICIP}" = "frommedia" ] && [ -e "${IFFILE}" ]
then
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 ':')"
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}
cat >> "${IFFILE}" << EOF
allow-hotplug ${ifname}
@@
-60,6
+62,17
@@
cat >> "${IFFILE}" << EOF
EOF
fi
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 [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
done
else
if [ -z "${NETBOOT}" ] || [ -n "${DHCP}" ]
@@
-122,20
+135,5
@@
EOF
fi
fi
fi
fi
- #if [ ! -x /root/usr/sbin/NetworkManager ]
- #then
- # for i in eth0 eth1 eth2 ath0 wlan0
- # do
- # grep -q "iface ${i}" ${IFFILE} && continue
- #
- #cat >> "${IFFILE}" << EOF
- #allow-hotplug ${i}
- #iface ${i} inet dhcp
- #
- #EOF
- #
- # done
- #fi
-
log_end_msg
}
log_end_msg
}