vapier      15/04/12 21:44:38

  Modified:             1.0.6-dmcrypt.confd 1.5.1-dmcrypt.rc
  Log:
  Use blkid -t to look up devices via tag values (like UUID/PARTUUID) #525524 
by tokiclover.
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.7                  sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd?rev=1.7&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd?rev=1.7&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd?r1=1.6&r2=1.7

Index: 1.0.6-dmcrypt.confd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.0.6-dmcrypt.confd,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- 1.0.6-dmcrypt.confd 12 Apr 2015 20:32:44 -0000      1.6
+++ 1.0.6-dmcrypt.confd 12 Apr 2015 21:44:38 -0000      1.7
@@ -34,6 +34,9 @@
 # target=<name>                      == Mapping name for partition.
 # swap=<name>                        == Mapping name for swap partition.
 # source='<dev>'                     == Real device for partition.
+#                                    Note: You can (and should) specify a tag 
like UUID
+#                                    for blkid (see -t option).  This is safer 
than using
+#                                    the full path to the device.
 # key='</path/to/keyfile>[:<mode>]'  == Fullpath from / or from inside 
removable media.
 # remdev='<dev>'                     == Device that will be assigned to 
removable media.
 # gpg_options='<opts>'               == Default are --quiet --decrypt



1.8                  sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc

file : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?rev=1.8&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?rev=1.8&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?r1=1.7&r2=1.8

Index: 1.5.1-dmcrypt.rc
===================================================================
RCS file: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- 1.5.1-dmcrypt.rc    12 Apr 2015 21:27:43 -0000      1.7
+++ 1.5.1-dmcrypt.rc    12 Apr 2015 21:44:38 -0000      1.8
@@ -1,7 +1,7 @@
 #!/sbin/runscript
 # Copyright 1999-2015 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc,v 
1.7 2015/04/12 21:27:43 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc,v 
1.8 2015/04/12 21:44:38 vapier Exp $
 
 depend() {
        before checkfs fsck
@@ -40,11 +40,12 @@
        else
                return
        fi
-       if [ "x${source#UUID}" != "x${source}" ]; then
-               source=${source#UUID=}
-               source="$(blkid -U ${source})"
-       fi
-       if [ -z "${source}" ] && [ ! -e "${source}" ] ; then
+       case ${source} in
+       *=*)
+               source=$(blkid -l -t "${source}" -o device)
+               ;;
+       esac
+       if [ -z "${source}" ] || [ ! -e "${source}" ] ; then
                ewarn "source \"${source}\" for ${target} missing, skipping..."
                return
        fi




Reply via email to