timeout function in cryptsetup init script
hello,
i'dd like to implement a timeout function into cryptdisks, an init
script for cryptsetup.
cryptsetup is run for every entry in /etc/crypttab. It unlocks a
encrypted partition with either a keyfile or a passphrase.
the passphrase prompt should have a timeout, as otherwise boot of
headless machines would hang forever.
i've already implemented a simple solution with /usr/bin/timeout from
the timeout package, but it requires the timeout package to be
installed, and the binary is in /usr/bin. cryptsetup is run before local
filesystems are mounted, thus both /usr and /var may not be available.
so what i really need, is a POSIX shell timeout function, that kills
cryptsetup after X seconds if cryptsetup is not already finished. it
mustn't depend on any binary in /usr, and it needs to allow interactive
password typing.
i've absolutely no idea about how to implement that, thus i mailed to
this list.
...
jonas
Reply to: