Normally when in interactive mode, when I type in exit, it displays Disconnected from Virtual Machine 'pick0:LINUX' and then returns to the bash shell prompt.
With my expect script, it is stuck on Disconnected from Virtual Machine 'pick0:LINUX' after issuing the exit command. Here's my expect script:
#!/usr/bin/expect -f
set timeout -1
spawn /usr/bin/d3 -0
expect "Options: F)ile only, A)BS only, X) eXecute. Q)uit = "
send -- "f"
expect "Are you sure that the restore media has been verified? Confirm (y/n)"
send -- "y"
expect "All data on disk will be erased. Confirm (y/n)"
send -- "y"
expect "Enter a unit number from the above list: "
send -- "1\r"
expect "Do you wish to disable file reallocation (y/<n>)? "
send -- "n\r"
expect "Load volume #1 and press <Enter>"
send -- "\r"
expect "Restore from incremental save tape (y/n)?"
send -- "n\r"
expect "Restore from transaction log tape (y/n)"
send -- "n\r"
expect "Enter your user id: "
send -- "dm\r"
expect "master dictionary: "
send -- "dm\r"
send -- "exit\r"
expect eof