2022-10-01 19:53:20 +02:00
|
|
|
set timeout 60
|
|
|
|
|
|
|
|
set FINISHED 0
|
|
|
|
set EXIT "1"
|
2023-12-22 16:49:43 +01:00
|
|
|
|
|
|
|
spawn socat unix-connect:vm/console -
|
|
|
|
expect {
|
|
|
|
"BusyBox" { }
|
|
|
|
"#" { }
|
|
|
|
}
|
|
|
|
send "\r\n"
|
|
|
|
expect {
|
|
|
|
"#" { send "NOT=not_present\r" }
|
|
|
|
}
|
2023-03-10 19:41:43 +01:00
|
|
|
expect "#"
|
2023-12-22 16:49:43 +01:00
|
|
|
while { $FINISHED < 10 } {
|
2024-09-18 17:04:51 +02:00
|
|
|
send "date && grep CTRL-EVENT-CONNECTED /run/uncaught-logs/* || echo \$NOT\r\n"
|
2022-10-01 19:53:20 +02:00
|
|
|
|
|
|
|
expect {
|
2024-09-18 17:04:51 +02:00
|
|
|
"wlan1: CTRL-EVENT-CONNECTED" { set FINISHED 999; set EXIT 0; }
|
2023-12-22 16:49:43 +01:00
|
|
|
"not_present" { send_user "waiting ...\n" ; sleep 5 }
|
2022-10-01 19:53:20 +02:00
|
|
|
}
|
|
|
|
set FINISHED [ expr $FINISHED + 1 ]
|
|
|
|
}
|
|
|
|
|
2023-12-22 16:49:43 +01:00
|
|
|
if { $EXIT > 0 } {
|
|
|
|
send "tail -40 /run/uncaught-logs/current\r\n"
|
|
|
|
expect "#"
|
|
|
|
}
|
2022-10-01 19:53:20 +02:00
|
|
|
exit $EXIT
|