Package: cryptsetup Version: 2:1.3.0-3 Severity: normal Tags: patch User: [email protected] Usertags: origin-ubuntu precise ubuntu-patch
When there's no line for the cryptsetup root device, a misleading warning is issues during update-initramfs: cryptsetup: WARNING: invalid line in /etc/crypttab - I'm attaching a patch that handles this better, by outputting cryptsetup: WARNING: Missing line in /etc/crypttab for $target in this case. I've ran into this when manually doing the "mdadm-cryptsetup-lvm2-initramfs" dance, and uses another name during "cryptsetup luksOpen". The bug has been reported against Ubuntu in Launchpad at: https://bugs.launchpad.net/ubuntu/+source/cryptsetup/+bug/332950
diff -Nru cryptsetup-1.3.0/debian/changelog cryptsetup-1.3.0/debian/changelog diff -Nru cryptsetup-1.3.0/debian/initramfs/cryptroot-hook cryptsetup-1.3.0/debian/initramfs/cryptroot-hook --- cryptsetup-1.3.0/debian/initramfs/cryptroot-hook 2011-03-07 23:37:16.000000000 +0100 +++ cryptsetup-1.3.0/debian/initramfs/cryptroot-hook 2011-11-09 14:48:51.000000000 +0100 @@ -184,7 +184,12 @@ key=$( echo $opt | cut -d " " -f3 ) rootopts=$( echo $opt | cut -d " " -f4- ) - if [ -z "$opt" ] || [ -z "$source" ] || [ -z "$key" ] || [ -z "$rootopts" ]; then + if [ -z "$opt" ] ; then + echo "cryptsetup: WARNING: Missing line in /etc/crypttab for $target" >&2 + return 1 + fi + + if [ -z "$source" ] || [ -z "$key" ] || [ -z "$rootopts" ]; then echo "cryptsetup: WARNING: invalid line in /etc/crypttab - $opt" >&2 return 1 fi

