From 8b013301513ed45b91d9d7fcb07e1f0ba65bd292 Mon Sep 17 00:00:00 2001 From: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> Date: Sun, 16 Feb 2025 23:13:46 +0100 Subject: [PATCH] chore: remove redundant checks Signed-off-by: Georg Lauterbach <44545919+georglauterbach@users.noreply.github.com> --- target/scripts/startup/setup.d/mail_state.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/target/scripts/startup/setup.d/mail_state.sh b/target/scripts/startup/setup.d/mail_state.sh index 201fec2c..34623859 100644 --- a/target/scripts/startup/setup.d/mail_state.sh +++ b/target/scripts/startup/setup.d/mail_state.sh @@ -5,7 +5,7 @@ DMS_STATE_DIR='/var/mail-state' # Consolidate all states into a single directory # (/var/mail-state) to allow persistence using docker volumes function _setup_save_states() { - if [[ ! -d ${DMS_STATE_DIR:?DMS_STATE_DIR is not set} ]]; then + if [[ ! -d ${DMS_STATE_DIR} ]]; then _log 'debug' "'${DMS_STATE_DIR}' is not present - not consolidating state" return 0 fi @@ -93,7 +93,7 @@ function _setup_save_states() { # These corrections are to fix changes to UID/GID values between upgrades, # or when ownership/permissions were altered externally on the host (eg: migration or system scripts) function _setup_adjust_state_permissions() { - [[ ! -d ${DMS_STATE_DIR:?DMS_STATE_DIR is not set} ]] && return 0 + [[ ! -d ${DMS_STATE_DIR} ]] && return 0 # This ensures the user and group of the files from the external mount have their # numeric ID values in sync. New releases where the installed packages order changes