X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F9990-grml-networking.sh;h=ace078e92315afb97e1509ddee8811780b582f7a;hb=52474b4c28303324;hp=0d73e5294964b7fe894695f4da3bb87b65b397ed;hpb=214cc032c4713bfaaecb2fb3b4377589684c90ab;p=live-boot-grml.git diff --git a/components/9990-grml-networking.sh b/components/9990-grml-networking.sh index 0d73e52..ace078e 100644 --- a/components/9990-grml-networking.sh +++ b/components/9990-grml-networking.sh @@ -8,6 +8,8 @@ if [ -n "${NONETWORKING}" ]; then return 0 fi +log_begin_msg "Preconfiguring Grml networking" + modprobe af_packet # req'd for DHCP # initialize udev @@ -37,7 +39,7 @@ fi # config for loopback networking cat > $IFFILE << EOF -# Initially generated on boot by initramfs' 23networking. +# Initially generated on boot by initramfs auto lo iface lo inet loopback @@ -47,8 +49,9 @@ EOF unset HOSTNAME # generate config for each present network device -for interface in /sys/class/net/eth* /sys/class/net/ath* /sys/class/net/wlan*; do +for interface in /sys/class/net/* ; do [ -e ${interface} ] || continue + [ "${interface}" = "lo" ] && continue interface=$(basename ${interface}) method="dhcp" @@ -94,7 +97,7 @@ iface ${interface} inet ${method} EOF else cat >> $IFFILE << EOF -auto ${interface} +allow-hotplug ${interface} iface ${interface} inet ${method} EOF fi @@ -133,14 +136,14 @@ EOF done # dns bootoption -if [ -n "$DNSSERVER1" ] +if [ -n "$DNSSERVERS" ] then # disable any existing entries if [ -r $RESOLVCONF ] then sed -i 's/nameserver/# nameserver/' $RESOLVCONF fi - for i in $DNSSERVER1 $DNSSERVER2 + for i in $DNSSERVERS do echo "nameserver $i" >> $RESOLVCONF done