Remove bashism
authordacook <schism@subverted.org>
Mon, 10 Jan 2011 16:24:10 +0000 (09:24 -0700)
committerdacook <schism@subverted.org>
Tue, 11 Jan 2011 19:20:40 +0000 (12:20 -0700)
Get rid of bash-ish "==" equivalence test in checking if the LUKS_KEY ends in
.gpg.  Use strict Bourne-compliant '=' instead.

defaults/initrd.scripts

index ea53fbab63cfc005539825847310a07c3f703f86..93daa5aafc7a274d815f90ddaee14d3a30ff80dd 100755 (executable)
@@ -827,7 +827,7 @@ openLUKS() {
                                        fi
                                        # At this point a candidate key exists (either mounted before or not)
                                        good_msg "${LUKS_KEY} on device ${LUKS_KEYDEV} found" ${CRYPT_SILENT}
-                                       if [ $(echo ${LUKS_KEY} | grep -o '.gpg$') == ".gpg" ] && [ -e /sbin/gpg ] ; then
+                                       if [ $(echo ${LUKS_KEY} | grep -o '.gpg$') = ".gpg" ] && [ -e /sbin/gpg ] ; then
                                                [ -e /dev/tty ] && mv /dev/tty /dev/tty.org
                                                mknod /dev/tty c 5 1
                                                cryptsetup_options="-d -"