summarylogtreecommitdiffstats
path: root/multiencrypt_hook
diff options
context:
space:
mode:
authorFaule Socke2016-06-17 22:51:59 +0200
committerFaule Socke2016-06-17 22:51:59 +0200
commit47fbe01113f8572965f61677a9564e3ffc9a8abc (patch)
tree962ab5f6430f5e93632cea212600fd159aa427c8 /multiencrypt_hook
parent8f8c7c760bf7cb6bf2fe40b8f4801241cb515d93 (diff)
downloadaur-mkinitcpio-multiencrypt.tar.gz
version 1.3 - performance improvements
Diffstat (limited to 'multiencrypt_hook')
-rw-r--r--multiencrypt_hook22
1 files changed, 13 insertions, 9 deletions
diff --git a/multiencrypt_hook b/multiencrypt_hook
index fa401636356..115624ab091 100644
--- a/multiencrypt_hook
+++ b/multiencrypt_hook
@@ -41,24 +41,28 @@ EOF
fi
while ! [ -e "/dev/mapper/${cryptname}" ]; do
- eval cryptsetup open --type luks --test-passphrase ${resolved} ${cryptname} ${cryptargs} >/dev/null 2>/dev/null <<EOF
+ #eval cryptsetup open --type luks --test-passphrase ${resolved} ${cryptname} ${cryptargs} >/dev/null 2>/dev/null <<EOF
+#${pw}
+#EOF
+ if [ -z "$pw" ]; then
+ echo -n "Enter password for ${cryptname}: "
+ read -r -s pw
+ echo ""
+ fi
+
+ eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET} <<EOF
${pw}
EOF
if [ $? -eq 0 ]; then
break
else
- echo -n "Enter password for ${cryptname}: "
- read -r -s pw
- echo ""
+ pw=""
fi
done
- eval cryptsetup open --type luks ${resolved} ${cryptname} ${cryptargs} ${CSQUIET} <<EOF
-${pw}
-EOF
if ! [ -e "/dev/mapper/${cryptname}" ]; then
- err "Password succeeded, but ${cryptname} creation failed, aborting..."
- exit 1
+ err "Password succeeded, but ${cryptname} creation failed, skipping..."
+ continue
fi
done
}