Make root_trim work with crypt_root_key
authorPeter Hjalmarsson <xake@rymdraket.net>
Wed, 22 Aug 2012 17:12:08 +0000 (19:12 +0200)
committerPeter Hjalmarsson <xake@rymdraket.net>
Tue, 28 Aug 2012 12:09:24 +0000 (14:09 +0200)
Keep options already set for cryptsetup when using crypt_root_key*

defaults/initrd.scripts

index 082d44d14b60b97654aef2155a1f511c909883ce..03e61e0955dcd32f18bccbf6d0352a011c817d0c 100755 (executable)
@@ -904,10 +904,10 @@ openLUKS() {
                                        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 -"
+                                               cryptsetup_options="${cryptsetup_options} -d -"
                                                gpg_cmd="/sbin/gpg --logger-file /dev/null --quiet --decrypt ${mntkey}${LUKS_KEY} |"
                                        else
-                                               cryptsetup_options="-d ${mntkey}${LUKS_KEY}"
+                                               cryptsetup_options="${cryptsetup_options} -d ${mntkey}${LUKS_KEY}"
                                        fi
                                fi
                                # At this point, keyfile or not, we're ready!