vapier      15/04/12 20:03:54

  Modified:             1.5.1-dmcrypt.rc
  Log:
  Fix bashisms in init script #451460 by Alexander Tsoy.
  
  (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 
D2E96200)

Revision  Changes    Path
1.3                  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.3&view=markup
plain: 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?rev=1.3&content-type=text/plain
diff : 
http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc?r1=1.2&r2=1.3

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.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- 1.5.1-dmcrypt.rc    19 Oct 2014 04:37:19 -0000      1.2
+++ 1.5.1-dmcrypt.rc    12 Apr 2015 20:03:54 -0000      1.3
@@ -1,7 +1,7 @@
 #!/sbin/runscript
-# Copyright 1999-2014 Gentoo Foundation
+# 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.2 2014/10/19 04:37:19 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc,v 
1.3 2015/04/12 20:03:54 vapier Exp $
 
 depend() {
        before checkfs fsck
@@ -103,8 +103,8 @@
                }
 
                # Notes: sed not used to avoid case where /usr partition is 
encrypted.
-               mode=${key/*:/} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" 
] ) && mode=reg
-               key=${key/:*/}
+               mode=${key##*:} && ( [ "${mode}" = "${key}" ] || [ -z "${mode}" 
] ) && mode=reg
+               key=${key%:*}
                case "${mode}" in
                gpg|reg)
                        # handle key on removable device
@@ -162,7 +162,7 @@
        if [ "${mode}" = "gpg" ] ; then
                : ${gpg_options:='-q -d'}
                # gpg available ?
-               if type -p gpg >/dev/null ; then
+               if command -v gpg >/dev/null ; then
                        for i in 0 1 2 ; do
                                # paranoid, don't store key in a variable, pipe 
it so it stays very little in ram unprotected.
                                # save stdin stdout stderr "values"
@@ -262,7 +262,7 @@
                esac
        done
 
-       while read -u 3 targetline ; do
+       while read targetline <&3 ; do
                case ${targetline} in
                # skip comments and blank lines
                ""|"#"*) continue ;;




Reply via email to