diff -u cryptsetup-1.0.6/debian/changelog cryptsetup-1.0.6/debian/changelog --- cryptsetup-1.0.6/debian/changelog +++ cryptsetup-1.0.6/debian/changelog @@ -1,3 +1,10 @@ +cryptsetup (2:1.0.6-7ubuntu5) jaunty; urgency=low + + * debian/initramfs/cryptroot-hook: fix support for UUID and LABEL correlation + between fstab and crypttab (LP: #287879). + + -- TJ Mon, 16 Feb 2009 23:00:00 +0000 + cryptsetup (2:1.0.6-7ubuntu4) jaunty; urgency=low * debian/askpass.c: also handle newline escape code in console prompt. diff -u cryptsetup-1.0.6/debian/initramfs/cryptroot-hook cryptsetup-1.0.6/debian/initramfs/cryptroot-hook --- cryptsetup-1.0.6/debian/initramfs/cryptroot-hook +++ cryptsetup-1.0.6/debian/initramfs/cryptroot-hook @@ -293,6 +293,7 @@ dev="/dev/disk/by-uuid/$altdev" fi + original=$dev if [ -h "$dev" ]; then dev=$(readlink -e "$dev") fi @@ -301,6 +302,11 @@ if [ "$altdev" != "$dev" ]; then echo "$altdev" return 0 + elif [ "x${original%/dev/disk/by-*/*}" = "x" ]; then + # support crypttab UUID/LABEL entries + # this is a /dev/disk/by-*/ path so return just the 'basename' + echo "${original##/dev/disk/by*/}" + return 0 fi return 1