Quantcast
Viewing latest article 7
Browse Latest Browse All 157

expect freezes after send

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


Viewing latest article 7
Browse Latest Browse All 157

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>