test: shell: Get the first ethernet device
In CI sometimes there are two, so this fails.
This commit is contained in:
@@ -11,7 +11,9 @@ function repeat() {
|
|||||||
set -x
|
set -x
|
||||||
|
|
||||||
# run unification with a dummy password
|
# 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=$!
|
pid=$!
|
||||||
wait $pid # get exit status
|
wait $pid # get exit status
|
||||||
e=$?
|
e=$?
|
||||||
|
|||||||
Reference in New Issue
Block a user