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

TJ ubuntu at tjworld.net
Mon Feb 9 19:01:32 UTC 2009


Ooops! The patch in comment #7 was premature. This is how it should be:

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 19:00:52.954064916 +0000
@@ -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

-- 
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