I'm trying to automate a Alpine Linux installation using the following script:
expect <<- EOF set timeout -1 spawn setup-disk -e -m sys /dev/sda expect { {WARNING: Erase the above disk(s) and continue? (y/n) \[n\] } { send "y\r" exp_continue }"Enter passphrase for /dev/sda3: " { send -- "helloworld\r" exp_continue }"Verify passphrase: " { send -- "helloworld\r" exp_continue } } expect eofEOF
The problem is that whenever the script reaches the second prompt, it sends the password, but is unable to proceed any further, it just hangs without showing the next prompt