2022-09-26 11:47:29 +02:00
|
|
|
set timeout 60
|
|
|
|
|
2023-02-08 23:16:39 +01:00
|
|
|
spawn socat unix-connect:vm/console -
|
2022-09-26 11:47:29 +02:00
|
|
|
send "\r\n"
|
2023-03-18 20:16:27 +01:00
|
|
|
expect "#"
|
2022-09-26 11:47:29 +02:00
|
|
|
set FINISHED 0
|
|
|
|
set EXIT "1"
|
2023-06-21 00:39:46 +02:00
|
|
|
while { $FINISHED < 10 } {
|
2022-09-26 11:47:29 +02:00
|
|
|
send "ip address show dev ppp0 | grep ppp0\r\n"
|
|
|
|
expect {
|
2023-06-21 00:39:46 +02:00
|
|
|
"192.168.100.1" { set FINISHED 20; set EXIT 0; }
|
2022-09-26 11:47:29 +02:00
|
|
|
"can't find device" { send_user "waiting ..." ; send "\r\n"; sleep 3 }
|
2023-11-24 22:32:53 +01:00
|
|
|
"DOWN" { send_user "waiting ..." ; send "\r\n"; sleep 3 }
|
2022-09-26 11:47:29 +02:00
|
|
|
}
|
|
|
|
set FINISHED [ expr $FINISHED + 1 ]
|
|
|
|
}
|
|
|
|
|
|
|
|
exit $EXIT
|