From: Michael Prokop Date: Fri, 14 Dec 2018 14:27:11 +0000 (+0100) Subject: 9990-grml-networking.sh: display Grml info, update interfaces comment + operate on... X-Git-Tag: debian/1%20180603+grml.1~1 X-Git-Url: http://git.grml.org/?p=live-boot-grml.git;a=commitdiff_plain;h=52474b4c283033247a3cac42b5551d4380835e7a 9990-grml-networking.sh: display Grml info, update interfaces comment + operate on all net devices * By displaying "Preconfiguring Grml networking" it's more explicit that we're running the 9990-grml-networking.sh code * It's not the 23networking live-initramfs hook since quite some time, update the comment for generation of /etc/network/interfaces * Support also new style network device names by iterating over /sys/class/net/* and skipping only the loopback interface --- diff --git a/components/9990-grml-networking.sh b/components/9990-grml-networking.sh index 394d011..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"