Skip to content

Commit

Permalink
Fix regex for the case the crypt volume is in use
Browse files Browse the repository at this point in the history
  • Loading branch information
rake5k committed Sep 24, 2024
1 parent 1b4d0cf commit 77d9b99
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/apps/nixos-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ mount_filesystems() {
CRYPT_VOL_STATUS="$(cryptsetup -q status "${ROOT_CRYPT}" || true)"
readonly CRYPT_VOL_STATUS
_log "[mount_filesystems] Volume encryption status is: ${CRYPT_VOL_STATUS}"
CRYPT_VOL_NUM_ACTIVE=$(echo "${CRYPT_VOL_STATUS}" | grep "^/dev/mapper/${ROOT_CRYPT} is active.$" -c || true)
CRYPT_VOL_NUM_ACTIVE=$(echo "${CRYPT_VOL_STATUS}" | grep "^/dev/mapper/${ROOT_CRYPT} is active" -c || true)
readonly CRYPT_VOL_NUM_ACTIVE
if (( CRYPT_VOL_NUM_ACTIVE < 1 )); then
_log "[mount_filesystems] Volume is not active yet, we need to decrypt it."
Expand Down

0 comments on commit 77d9b99

Please sign in to comment.