Source: cryptsetup Version: 2:2.0.2-1 Severity: wishlist Tags: patch Hi,
It would be nice if the sleep-on-failure time was configurable, just like tries=N, etc. Patch attached. Regards, -- ,''`. : :' : Chris Lamb `. `'` la...@debian.org / chris-lamb.co.uk `-
diff --git a/debian/initramfs/cryptroot-script b/debian/initramfs/cryptroot-script index 75299a0..c562eed 100644 --- a/debian/initramfs/cryptroot-script +++ b/debian/initramfs/cryptroot-script @@ -73,6 +73,7 @@ parse_options() cryptkey="" # This is only used as an argument to an eventual keyscript cryptkeyslot="" crypttries=3 + cryptfailsleep=60 crypttcrypt="" cryptveracrypt="" cryptrootdev="" @@ -140,6 +141,14 @@ parse_options() ;; esac ;; + failsleep=*) + cryptfailsleep="${x#failsleep=}" + case "$cryptfailsleep" in + *[![:digit:].]*) + cryptfailsleep=60 + ;; + esac + ;; tcrypt) crypttcrypt="yes" ;; @@ -379,12 +388,10 @@ setup_mapping() break done - failsleep=60 # make configurable later? - if [ "$cryptrootdev" = "yes" ] && [ $crypttries -gt 0 ] && [ $count -ge $crypttries ]; then message "cryptsetup ($crypttarget): maximum number of tries exceeded" - message "cryptsetup: going to sleep for $failsleep seconds..." - sleep $failsleep + message "cryptsetup: going to sleep for $cryptfailsleep seconds..." + sleep $cryptfailsleep exit 1 fi