]> piware.de Git - bin.git/blobdiff - f25-update.exp
add expect scripts for VM updates
[bin.git] / f25-update.exp
diff --git a/f25-update.exp b/f25-update.exp
new file mode 100755 (executable)
index 0000000..d4eaa34
--- /dev/null
@@ -0,0 +1,20 @@
+#!/usr/bin/expect -f
+
+set timeout -1
+
+#Start the guest VM
+spawn vm /srv/vm/f25.img -nographic
+
+expect "login: "
+send "a\r"
+
+expect "Password: "
+send "a\r"
+
+expect "$ "
+send "echo a | sudo --stdin dnf update -y\r"
+
+expect "$ "
+send "echo a | sudo --stdin poweroff\r"
+
+expect "$ "