Fix bug of the file existing check

This commit is contained in:
Suikan 2021-06-28 23:15:14 +09:00
parent 5bba11567e
commit a7c48adc9e

View file

@ -72,7 +72,7 @@ fi
printf %s "${PASSPHRASE}" | cryptsetup open -d - "${DEV}${CRYPTPARTITION}" ${CRYPTPARTNAME} printf %s "${PASSPHRASE}" | cryptsetup open -d - "${DEV}${CRYPTPARTITION}" ${CRYPTPARTNAME}
# Check whether successful open. If mapped, it is successful. # Check whether successful open. If mapped, it is successful.
if [ ! -d /dev/mapper/${CRYPTPARTNAME} ] ; then if [ ! -e /dev/mapper/${CRYPTPARTNAME} ] ; then
cat <<HEREDOC 1>&2 cat <<HEREDOC 1>&2
***** ERROR : Cannot open LUKS volume ${CRYPTPARTNAME} on ${DEV}${CRYPTPARTITION}. ***** ***** ERROR : Cannot open LUKS volume ${CRYPTPARTNAME} on ${DEV}${CRYPTPARTITION}. *****
Check the passphrase Check the passphrase