From 2cb73ed0b4ddd1dd6909a8717e646b8cf8e767c8 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Tue, 18 Oct 2016 16:05:36 +0200 Subject: [rfs-stage31] Show more information if boot interface could not be determined --- remote/rootfs/rootfs-stage31/data/inc/setup_network | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/remote/rootfs/rootfs-stage31/data/inc/setup_network b/remote/rootfs/rootfs-stage31/data/inc/setup_network index 13c52289..956df03c 100644 --- a/remote/rootfs/rootfs-stage31/data/inc/setup_network +++ b/remote/rootfs/rootfs-stage31/data/inc/setup_network @@ -26,14 +26,21 @@ mkdir -p "${FUTURE_ROOT}/etc/udev/rules.d" IP_OUT=$(ip a | grep -B 1 "/ether" | sed -r '/^--$/d;$!N;s#^[0-9]+: ([a-z0-9\.:]+): .*?/ether ([0-9a-fA-Z:]+) .*$#\1==\2#') if ! echo "$IP_OUT" | grep -q -- "$MAC"; then - drop_shell "Boot interface not found in interface list. NIC driver missing?" + drop_shell "--- +$(ip a) +--- +$IP_OUT +--- + +Boot interface $MAC not found in interface list. NIC driver missing?" + : fi for LINE in $IP_OUT; do IFACE=$(echo "$LINE" | awk -F '==' '{printf $1}') IFMAC=$(echo "$LINE" | awk -F '==' '{printf $2}' | tr '[A-Z]' '[a-z]') # udev requires mac addesses to be lowercase (a-f), see http://www.debianhelp.co.uk/udev.htm echo "${IFACE} = ${IFMAC}" - + if [ "x$IFMAC" == "x$MAC" ]; then brctl addbr "$BRIDGE" || drop_shell "Could not create bridge $BRIDGE" brctl stp "$BRIDGE" 0 -- cgit v1.2.3-55-g7522