-
-
Save grahamc/77693e6132f72ff61be44b656c0ecdfc to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
set uuid [lindex $argv 0]; | |
set region [lindex $argv 1]; | |
# connect to the serial console over ssh | |
spawn ./console.sh "$uuid" "$region" | |
set timeout 1200 | |
send "\n" | |
set UP \x1B\[A; | |
set DOWN \x1B\[B; | |
expect { | |
"NixOS - All configurations" { | |
puts ">>>> GRUB LOOKS GOOD" | |
} | |
} | |
set timeout 1 | |
while true { | |
expect { | |
"NixOS" { | |
puts "cool" | |
break | |
} | |
timeout { | |
send -- \x1B\[A; | |
send -- \x1B\[B; | |
} | |
} | |
} | |
send "\r\n" | |
while true { | |
expect { | |
"Configuration 2" { | |
puts ">>>> CONFIGURATION 2 LOOKS GOOD" | |
break | |
} | |
timeout { | |
send -- \x1B\[A; | |
send -- \x1B\[B; | |
} | |
} | |
} | |
send -- \x1B\[B; | |
send "\r\n" | |
set timeout 1200 | |
expect { | |
"Welcome to NixOS" { | |
puts ">>>> BOOTED" | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment