bin: Add SERIAL_WRITE output for link waiting and payload execution

fix_package_url
Marc 2021-08-23 19:30:14 +01:00
parent fece2024ae
commit 5e3b4e3928
No known key found for this signature in database
GPG Key ID: 0657563F705ACAAE
1 changed files with 4 additions and 2 deletions

View File

@ -9,6 +9,7 @@ fi
wait_for_link() {
LED SETUP
SERIAL_WRTIE "[*] Waiting for Ethernet link to come up..."
until swconfig dev switch0 port 0 get link | grep -q 'link:up'; do
sleep 1
done
@ -16,6 +17,7 @@ wait_for_link() {
}
wait_for_no_link() {
LED LINKSETUP
SERIAL_WRITE "[*] Waiting for Ethernet link to go down..."
until swconfig dev switch0 port 0 get link | grep -q 'link:down'; do
sleep 1
done
@ -37,7 +39,7 @@ fi
wait_for_link
$LOG "Running requested PAYLOAD"
SERIAL_WRITE "[*] Starting Payload"
case $(basename "${payload}") in
"payload.py")
python "${payload}" > /dev/null 2>&1