liminix-fork/tests/wlan/wait-for-wlan.expect
Daniel Barlow a0bd250963 switch from getty to root shell on console
this just makes things marginally simpler
2023-11-21 23:09:48 +00:00

20 lines
430 B
Text

set timeout 60
spawn socat unix-connect:vm/console -
send "\r\n"
expect "#"
set FINISHED 0
set EXIT "1"
send "ls -l /run/uncaught-logs/current\r\n"
expect "#"
while { $FINISHED < 10 } {
send "grep AP-ENABLED /run/uncaught-logs/current || echo not\r\n"
expect {
"wlan0: AP-ENABLED" { set FINISHED 10; set EXIT 0; }
"not" { send_user "waiting ..." ; sleep 5 }
}
set FINISHED [ expr $FINISHED + 1 ]
}
exit $EXIT