first pass at a hostapd service, rough around the edges

This commit is contained in:
Daniel Barlow
2022-10-01 18:53:20 +01:00
parent 8cff11d0a3
commit da8866a01a
5 changed files with 129 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
set timeout 60
spawn socat unix-connect:foo.sock -
send "\r\n"
expect "login:" { send "root\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