Bug 164795 - sys-fs/cryptsetup-luks - set timeout in dm-crypt-start
Bug#: 164795 Product:  Gentoo Linux Version: 2006.1 Platform: All
OS/Version: Linux Status: RESOLVED Severity: normal Priority: P2
Resolution: FIXED Assigned To: strerror@gentoo.org Reported By: bettlertho@sis.unibe.ch
Component: Core system
URL: 
Summary: sys-fs/cryptsetup-luks - set timeout in dm-crypt-start
Keywords:  
Status Whiteboard: 
Opened: 2007-02-01 08:41 0000
Description:   Opened: 2007-02-01 08:41 0000
/lib/rcscripts/addons/dm-crypt-start.sh should have a default timeout value
if something unexpected happens. If your machine is unattended it shouldn't
wait forever, but try to continue without mapping your encrypted devices.

As I use an external device as key storage formatted with vfat, I ran into case
conversion problems without having a clue, why my box is hanging now, since I
have no monitor attached to it. So I couldn't even remotely get a clue of all
these troubles.

Of course the timeout should be long, so that it only applies to unattended
boxes.

------- Comment #1 From Thomas Bettler 2007-02-01 08:42:07 0000 -------
Created an attachment (id=108823) [details]
dm-crypt.patch

My proposition

------- Comment #2 From Christian Ludwig 2007-05-28 17:40:06 0000 -------
I am perfectly fine with the current state. Since I would need to plug in my
USB thumb drive within your proposed 60 seconds, I would be forced to watch the
boot process.

Perhaps we couĺd make a config option out of this?

------- Comment #3 From Thomas Bettler 2007-06-06 21:06:27 0000 -------
I agree totally. I'd prefer to introduce a bootparam, 
as this will allow us to also handle bug 162962 with the same param.
As this is right before mounting root, there is no easy way to configure it in
a file,
what makes me opt for the bootparam.

We could introduce
key_timeout=[secs to wait]

and use this value each time we don't detect our device.
Value of zero will mean wait forever.

------- Comment #4 From Thomas Bettler 2007-06-06 22:06:07 0000 -------
Created an attachment (id=121362) [details]
dm-crypt.patch

Voila, here a first example...

------- Comment #5 From Thomas Bettler 2007-06-08 08:15:20 0000 -------
Created an attachment (id=121473) [details]
dm-crypt.patch

Sorry, I just forgot to merge that length function... here it is and works fine
on my 2 boxes.

------- Comment #6 From Benjamin Smee (strerror) (RETIRED) 2007-10-02 15:47:28 0000 -------
thanks for patch. Some mods and in cvs.