116 lines
2.2 KiB
Plaintext
Executable file
116 lines
2.2 KiB
Plaintext
Executable file
#!/usr/bin/env expect
|
|
|
|
spawn {*}$argv
|
|
|
|
expect -timeout 300 -ex "login: "
|
|
send "root\r"
|
|
expect -ex ":~# "
|
|
|
|
send "export TERM=dumb\r"
|
|
expect -ex ":~# "
|
|
|
|
send "setup-alpine\r"
|
|
expect -ex "\[localhost\] "
|
|
send "ararat.0x90.space\r"
|
|
expect -ex "\[eth0\] "
|
|
send "\r"
|
|
expect -ex "\[dhcp\] "
|
|
send "\r"
|
|
expect -ex "\[n\] "
|
|
send "\r"
|
|
expect -timeout 300 -ex "New password: "
|
|
send "\r"
|
|
expect -ex "Retype password: "
|
|
send "\r"
|
|
expect -ex "\[UTC\] "
|
|
send "\r"
|
|
expect -timeout 300 -ex "\[none\] "
|
|
send "\r"
|
|
expect -ex "\[chrony\] "
|
|
send "openntp\r"
|
|
expect -ex "\[1\] "
|
|
send "\r"
|
|
expect -timeout 300 -ex "\[no\] "
|
|
send "\r"
|
|
expect -ex "\[openssh\] "
|
|
send "openssh\r"
|
|
expect -timeout 300 -ex "\[none\] "
|
|
send "\r"
|
|
expect -ex "\[none\] "
|
|
send "\r"
|
|
expect -ex "\[/var/cache/apk\] "
|
|
send "none\r"
|
|
expect -ex ":~# "
|
|
|
|
send "fdisk /dev/vda\r"
|
|
expect -ex "Command (m for help): "
|
|
send "n\r"
|
|
expect -ex "extended"
|
|
send "p\r"
|
|
expect -ex ": "
|
|
send "1\r"
|
|
expect -ex ": "
|
|
send "\r"
|
|
expect -ex ": "
|
|
send "+1G\r"
|
|
expect -ex "Command (m for help): "
|
|
send "a\r"
|
|
expect -ex ": "
|
|
send "1\r"
|
|
expect -ex "Command (m for help): "
|
|
send "t\r"
|
|
expect -ex ": "
|
|
send "0c\r"
|
|
expect -ex "Command (m for help): "
|
|
send "w\r"
|
|
expect -ex ":~# "
|
|
|
|
send "fdisk /dev/vdb\r"
|
|
expect -ex "Command (m for help): "
|
|
send "n\r"
|
|
expect -ex "extended"
|
|
send "p\r"
|
|
expect -ex ": "
|
|
send "1\r"
|
|
expect -ex ": "
|
|
send "\r"
|
|
expect -ex ": "
|
|
send "+1G\r"
|
|
expect -ex "Command (m for help): "
|
|
send "a\r"
|
|
expect -ex ": "
|
|
send "1\r"
|
|
expect -ex "Command (m for help): "
|
|
send "t\r"
|
|
expect -ex ": "
|
|
send "0c\r"
|
|
expect -ex "Command (m for help): "
|
|
send "w\r"
|
|
expect -ex ":~# "
|
|
|
|
send "mkfs.vfat /dev/vda1\r"
|
|
expect -ex ":~# "
|
|
send "modprobe vfat\r"
|
|
expect -ex ":~# "
|
|
send "setup-bootable /media/cdrom /dev/vda1\r"
|
|
expect -timeout 300 -ex ":~# "
|
|
|
|
#send "apk add mdadm\r"
|
|
#expect -ex ":~# "
|
|
#send "mdadm --create --metadata=0.90 --level=1 --raid-devices=2 /dev/md0 /dev/vda1 /dev/vdb1\r"
|
|
##expect -ex "Continue creating array?"
|
|
##send "y\r"
|
|
#expect -ex ":~# "
|
|
#send "mdadm --detail --scan > /etc/mdadm.conf\r"
|
|
#expect -ex ":~# "
|
|
#send "rc-update add mdadm-raid\r"
|
|
#expect -ex ":~# "
|
|
#
|
|
#send "mkfs.vfat /dev/md0\r"
|
|
#expect -ex ":~# "
|
|
#send "modprobe vfat\r"
|
|
#expect -ex ":~# "
|
|
#send "setup-bootable /media/cdrom /dev/md0\r"
|
|
#expect -timeout 300 -ex ":~# "
|
|
|