shellcheck fixes

This commit is contained in:
Tobias Powalowski 2023-01-09 17:19:36 +01:00
parent e291e80a4d
commit 05e015fae9
2 changed files with 2 additions and 2 deletions

View file

@ -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

View file

@ -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