X-Git-Url: http://git.grml.org/?a=blobdiff_plain;f=components%2F9990-grml-networking.sh;h=939c0ea56f4d0998742ccf40b82ac66715a41c48;hb=f9a1d707cf5e367cfdd0925f86a7ff69e108da26;hp=49ceb811c217fc004be48f639c3b473d823f544a;hpb=5314f34b98a48f324a5e2dbf090837c252f27fee;p=live-boot-grml.git diff --git a/components/9990-grml-networking.sh b/components/9990-grml-networking.sh index 49ceb81..939c0ea 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,9 +49,10 @@ 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=$(basename ${interface}) + [ "${interface}" = "lo" ] && continue method="dhcp" # NODHCP or a previously run ipconfig mean that ifupdown should never @@ -94,7 +97,7 @@ iface ${interface} inet ${method} EOF else cat >> $IFFILE << EOF -auto ${interface} +allow-hotplug ${interface} iface ${interface} inet ${method} EOF fi @@ -130,6 +133,10 @@ EOF unset IPV4DNS IPV4DNSLIST echo>> $IFFILE + echo '# Support overriding defaults:' >> $IFFILE + echo 'source /etc/network/interfaces.d/*' >> $IFFILE + + echo>> $IFFILE done # dns bootoption