diff --git a/libports/run/lwip.run b/libports/run/lwip.run index 1e42d03d9..8ef1e47b3 100644 --- a/libports/run/lwip.run +++ b/libports/run/lwip.run @@ -148,16 +148,15 @@ append qemu_args " -net user -redir tcp:5555::80 " run_genode_until {.*Start the server loop \.\.\..*} 30 -if [is_amt_available] { - set match_string "got IP address" - grep_output $match_string - unify_output {[\r\n\t]+} "" - unify_output {[\033]\[0m} "" - set pos [string first $match_string $output] - set ip_addr [string replace $output 0 [expr $pos+14]] - set uri "http://$ip_addr:80/" -} else { + +if [is_qemu_available] { set uri "http://localhost:5555/" +} else { + set match_string "got IP address (.*)\033.*\n" + run_genode_until $match_string 30 $server_spawn_id + regexp $match_string $output all ip_addr + + set uri "http://$ip_addr:80/" } puts "http server is up, try to query website $uri"