http://www.perlmonks.org?node_id=1050295


in reply to Expect for cryptsetup

@kcott: Sorry for not clearing it out:

"Works" translates to "creation of the decrypted device /dev/mapper/dec-DATA

"Does not work" means no creation of decrypted device

@grondilu: That will mean the keyfile will be available somewhere in the filesystem. We do not want that. The passphrase will be in fact entered by the user through a web interface to decrypt the volume.

Anyway the CPAN guys figured it out. It was a race condition which is solved by a simple "sleep 1" after the $exp->send command.

Thanks guys!