summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2015-04-12 20:03:54 +0000
committerMike Frysinger <vapier@gentoo.org>2015-04-12 20:03:54 +0000
commit171befdd466ff3e64e893af1cc4955970318a5be (patch)
tree3a69276b44cd386aad2d62794ee0f47fbbb120d8 /sys-fs/cryptsetup
parentversion bump (diff)
downloadgentoo-2-171befdd466ff3e64e893af1cc4955970318a5be.tar.gz
gentoo-2-171befdd466ff3e64e893af1cc4955970318a5be.tar.bz2
gentoo-2-171befdd466ff3e64e893af1cc4955970318a5be.zip
Fix bashisms in init script #451460 by Alexander Tsoy.
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
Diffstat (limited to 'sys-fs/cryptsetup')
-rw-r--r--sys-fs/cryptsetup/ChangeLog5
-rwxr-xr-xsys-fs/cryptsetup/files/1.5.1-dmcrypt.rc12
2 files changed, 10 insertions, 7 deletions
diff --git a/sys-fs/cryptsetup/ChangeLog b/sys-fs/cryptsetup/ChangeLog
index d59b72cc8637..415a5fb662d0 100644
--- a/sys-fs/cryptsetup/ChangeLog
+++ b/sys-fs/cryptsetup/ChangeLog
@@ -1,6 +1,9 @@
# ChangeLog for sys-fs/cryptsetup
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/ChangeLog,v 1.198 2015/04/12 18:13:44 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/cryptsetup/ChangeLog,v 1.199 2015/04/12 20:03:54 vapier Exp $
+
+ 12 Apr 2015; Mike Frysinger <vapier@gentoo.org> files/1.5.1-dmcrypt.rc:
+ Fix bashisms in init script #451460 by Alexander Tsoy.
12 Apr 2015; Mike Frysinger <vapier@gentoo.org> cryptsetup-1.6.5.ebuild,
cryptsetup-1.6.6.ebuild, metadata.xml:
diff --git a/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc b/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc
index 9415a0bcef56..359ded4f8942 100755
--- a/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc
+++ b/sys-fs/cryptsetup/files/1.5.1-dmcrypt.rc
@@ -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 @@ dm_crypt_execute_dmcrypt() {
}
# 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 @@ dm_crypt_execute_dmcrypt() {
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 @@ start() {
esac
done
- while read -u 3 targetline ; do
+ while read targetline <&3 ; do
case ${targetline} in
# skip comments and blank lines
""|"#"*) continue ;;