From 26640df164592100aca067d464dcec0a67a0f9b8 Mon Sep 17 00:00:00 2001 From: James Shubin Date: Tue, 30 Sep 2025 00:27:35 -0400 Subject: [PATCH] test: shell: Get the first ethernet device In CI sometimes there are two, so this fails. --- test/shell/embedded-provisioner.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/test/shell/embedded-provisioner.sh b/test/shell/embedded-provisioner.sh index fd5a1ff9..81c4b405 100755 --- a/test/shell/embedded-provisioner.sh +++ b/test/shell/embedded-provisioner.sh @@ -11,7 +11,9 @@ function repeat() { set -x # run unification with a dummy password -$TIMEOUT "$MGMT" provisioner --only-unify --password $(repeat "#" 106) & +eth=$(for i in /sys/class/net/*; do d=${i##*/}; [[ "$d" != "lo" && $(<"$i/type") -eq 1 ]] && echo "$d" && break; done) # get the first ethernet device + +$TIMEOUT "$MGMT" provisioner --interface $eth --only-unify --password $(repeat "#" 106) & pid=$! wait $pid # get exit status e=$?