diff --git a/usr/lib/archboot/installer/autoconfiguration.sh b/usr/lib/archboot/installer/autoconfiguration.sh index 1531bd5ba..5d6485cfc 100644 --- a/usr/lib/archboot/installer/autoconfiguration.sh +++ b/usr/lib/archboot/installer/autoconfiguration.sh @@ -179,7 +179,7 @@ _auto_vconsole() { _auto_luks() { # remove root device from crypttab - if [[ -e /tmp/.crypttab && -z "$(grep -v '^#' "${_DESTDIR}"/etc/crypttab)" ]]; then + if [[ -e /tmp/.crypttab && "$(grep -v '^#' "${_DESTDIR}"/etc/crypttab)" == "" ]]; then _dialog --infobox "Enable luks settings on installed system ..." 3 70 # add to temp crypttab sed -i -e "/^$(basename "${_PART_ROOT}") /d" /tmp/.crypttab diff --git a/usr/lib/archboot/installer/blockdevices.sh b/usr/lib/archboot/installer/blockdevices.sh index 3fad40127..1a79dd9f9 100644 --- a/usr/lib/archboot/installer/blockdevices.sh +++ b/usr/lib/archboot/installer/blockdevices.sh @@ -648,7 +648,7 @@ _createraid() _RAIDOPTIONS="--force --run --level=${_LEVEL}" ! [[ "${_RAID_DEVICES}" == 0 ]] && _RAIDOPTIONS="${_RAIDOPTIONS} --raid-devices=${_RAID_DEVICES}" ! [[ "${_SPARE_DEVICES}" == 0 ]] && _RAIDOPTIONS="${_RAIDOPTIONS} --spare-devices=${_SPARE_DEVICES}" - ! [[ -z "${_PARITY}" ]] && _RAIDOPTIONS="${_RAIDOPTIONS} --layout=${_PARITY}" + [[ -n "${_PARITY}" ]] && _RAIDOPTIONS="${_RAIDOPTIONS} --layout=${_PARITY}" _dialog --infobox "Creating ${_RAIDDEVICE}..." 0 0 #shellcheck disable=SC2086 if mdadm --create ${_RAIDDEVICE} ${_RAIDOPTIONS} ${_DEVICES} >"${_LOG}" 2>&1; then