vapier 15/04/12 21:27:43 Modified: 1.5.1-dmcrypt.rc Log: Delete old dm_crypt_execute_localmount hook as no one uses it anymore #321507 by forums. (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.5.1-dmcrypt.rc file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?rev=1.7&view=markup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?rev=1.7&content-type=text/plain diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?r1=1.6&r2=1.7 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.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- 1.5.1-dmcrypt.rc 12 Apr 2015 20:40:40 -0000 1.6 +++ 1.5.1-dmcrypt.rc 12 Apr 2015 21:27:43 -0000 1.7 @@ -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.6 2015/04/12 20:40:40 vapier Exp $ +# $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 $ depend() { before checkfs fsck @@ -12,9 +12,6 @@ } # We support multiple dmcrypt instances based on $SVCNAME -execute_hook="dm_crypt_execute_dmcrypt" -# XXX: Should we drop this ? -# execute_hook="dm_crypt_execute_localmount" conf_file="/etc/conf.d/${SVCNAME}" # Get splash helpers if available. @@ -24,7 +21,7 @@ # Setup mappings for an individual target/swap # Note: This relies on variables localized in the main body below. -dm_crypt_execute_dmcrypt() { +dm_crypt_execute() { local dev ret mode foo if [ -n "${target}" ] ; then @@ -210,33 +207,6 @@ fi } -# Run any post_mount commands for an individual mount -# -# Note: This relies on variables localized in the main body below. -dm_crypt_execute_localmount() { - local mount_point - - [ -z "${target}" ] && [ -z "${post_mount}" ] && return - - if ! cryptsetup status ${target} | egrep -q '\<active:' ; then - ewarn "Skipping unmapped target ${target}" - cryptfs_status=1 - return - fi - - mount_point=$(grep "/dev/mapper/${target}" /proc/mounts | cut -d' ' -f2) - if [ -z "${mount_point}" ] ; then - ewarn "Failed to find mount point for ${target}, skipping" - cryptfs_status=1 - fi - - if [ -n "${post_mount}" ] ; then - ebegin "Running post_mount commands for target ${target}" - eval "${post_mount}" >/dev/null - eend $? || cryptfs_status=1 - fi -} - # Lookup optional bootparams get_bootparam_val() { # We're given something like: @@ -281,7 +251,7 @@ case ${targetline} in target=*|swap=*) # If we have a target queued up, then execute it - ${execute_hook} + dm_crypt_execute # Prepare for the next target/swap by resetting variables unset gpg_options key loop_file target options pre_mount post_mount source swap remdev @@ -304,12 +274,12 @@ ;; esac - # Queue this setting for the next call to dm_crypt_execute_xxx + # Queue this setting for the next call to dm_crypt_execute eval "${targetline}" done 3< ${conf_file} # If we have a target queued up, then execute it - ${execute_hook} + dm_crypt_execute ewend ${cryptfs_status} "Failed to setup dm-crypt devices" }
