summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Rettberg2016-10-18 16:05:36 +0200
committerSimon Rettberg2016-10-18 16:05:36 +0200
commit2cb73ed0b4ddd1dd6909a8717e646b8cf8e767c8 (patch)
tree4d3476dbbc6790b77edc5643a36db04037b0ca15
parent[debug_report] Make it more good and less bad (diff)
downloadtm-scripts-2cb73ed0b4ddd1dd6909a8717e646b8cf8e767c8.tar.gz
tm-scripts-2cb73ed0b4ddd1dd6909a8717e646b8cf8e767c8.tar.xz
tm-scripts-2cb73ed0b4ddd1dd6909a8717e646b8cf8e767c8.zip
[rfs-stage31] Show more information if boot interface could not be determined
-rw-r--r--remote/rootfs/rootfs-stage31/data/inc/setup_network11
1 files 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