[Bug 287879] Re: cryptsetup does not understand UUID= in fstab and conf.d/resume

TJ ubuntu at tjworld.net
Mon Feb 9 18:47:52 UTC 2009


My previous suggested patch would cause unwanted side effects when
device aliases/symlinks are used for non-crypt disks.

This patch should provide the desired result without causing a
regression:

diff -Nu cryptsetup-1.0.6/debian/initramfs/cryptroot-hook /target/usr/share/initramfs-tools/hooks/cryptroot
--- cryptsetup-1.0.6/debian/initramfs/cryptroot-hook	2009-02-09 18:42:15.358063612 +0000
+++ /target/usr/share/initramfs-tools/hooks/cryptroot	2009-02-09 18:37:40.766072461 +0000
@@ -301,6 +301,11 @@
 	if [ "$altdev" != "$dev" ]; then
 		echo "$altdev"
 		return 0
+	elif [ "x${dev%/dev/disk/by-*/*}" = "x" ]; then
+		# support crypttab UUID/LABEL entries
+		# this is a /dev/disk/by-*/ path so return just the 'basename'
+		echo "${dev##/dev/disk/by*/}"
+		return 0
 	fi
 
 	return 1

-- 
cryptsetup does not understand UUID= in fstab and conf.d/resume
https://bugs.launchpad.net/bugs/287879
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.

-- 
ubuntu-bugs mailing list
ubuntu-bugs at lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs




More information about the universe-bugs mailing list