diff --git a/sources/bin/check_health.sh b/sources/bin/check_health.sh index 9e27966..23caa73 100644 --- a/sources/bin/check_health.sh +++ b/sources/bin/check_health.sh @@ -1183,10 +1183,8 @@ case ${ARG_ACTION} in # set & initialize STDOUT/STDERR locations (not in init_hc()!) HC_STDOUT_LOG="${TMP_DIR}/${HC_RUN}.stdout.log.$$" HC_STDERR_LOG="${TMP_DIR}/${HC_RUN}.stderr.log.$$" - # shellcheck disable=SC2188 - >${HC_STDOUT_LOG} 2>/dev/null - # shellcheck disable=SC2188 - >${HC_STDERR_LOG} 2>/dev/null + : >${HC_STDOUT_LOG} 2>/dev/null + : >${HC_STDERR_LOG} 2>/dev/null # --check-host handling: alternative configuration file, mangle ARG_CONFIG_FILE & HC_TIME_OUT if (( ARG_CHECK_HOST == 1 )) diff --git a/sources/lib/platform/aix/check_aix_file_change.sh b/sources/lib/platform/aix/check_aix_file_change.sh index 3a4fb4c..2c5a77c 100644 --- a/sources/lib/platform/aix/check_aix_file_change.sh +++ b/sources/lib/platform/aix/check_aix_file_change.sh @@ -135,34 +135,29 @@ fi # check state file & TMP_FILEs [[ -r ${_STATE_FILE} ]] || { - # shellcheck disable=SC2188 - >${_STATE_FILE} + : >${_STATE_FILE} (( $? > 0 )) && { warn "failed to create new state file at ${_STATE_FILE}" return 1 } log "created new state file at ${_STATE_FILE}" } -# shellcheck disable=SC2188 ->${_TMP_INCL_FILE} +: >${_TMP_INCL_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP_INCL_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP_EXCL_FILE} +: >${_TMP_EXCL_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP_EXCL_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP1_FILE} +: >${_TMP1_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP1_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP2_FILE} +: >${_TMP2_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP2_FILE}" return 1 diff --git a/sources/lib/platform/hp-ux/check_hpux_file_change.sh b/sources/lib/platform/hp-ux/check_hpux_file_change.sh index b876147..6ae35af 100644 --- a/sources/lib/platform/hp-ux/check_hpux_file_change.sh +++ b/sources/lib/platform/hp-ux/check_hpux_file_change.sh @@ -135,34 +135,29 @@ fi # check state file & TMP_FILEs [[ -r ${_STATE_FILE} ]] || { - # shellcheck disable=SC2188 - >${_STATE_FILE} + : >${_STATE_FILE} (( $? > 0 )) && { warn "failed to create new state file at ${_STATE_FILE}" return 1 } log "created new state file at ${_STATE_FILE}" } -# shellcheck disable=SC2188 ->${_TMP_INCL_FILE} +: >${_TMP_INCL_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP_INCL_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP_EXCL_FILE} +: >${_TMP_EXCL_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP_EXCL_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP1_FILE} +: >${_TMP1_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP1_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP2_FILE} +: >${_TMP2_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP2_FILE}" return 1 diff --git a/sources/lib/platform/hp-ux/check_hpux_lunpaths.sh b/sources/lib/platform/hp-ux/check_hpux_lunpaths.sh index e3d81b9..6246ac4 100644 --- a/sources/lib/platform/hp-ux/check_hpux_lunpaths.sh +++ b/sources/lib/platform/hp-ux/check_hpux_lunpaths.sh @@ -105,14 +105,12 @@ then fi # check TMP_FILEs -# shellcheck disable=SC2188 ->${_TMP1_FILE} +: >${_TMP1_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP1_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP2_FILE} +: >${_TMP2_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP2_FILE}" return 1 diff --git a/sources/lib/platform/linux/check_linux_file_change.sh b/sources/lib/platform/linux/check_linux_file_change.sh index 37c2756..eb9c313 100644 --- a/sources/lib/platform/linux/check_linux_file_change.sh +++ b/sources/lib/platform/linux/check_linux_file_change.sh @@ -136,34 +136,29 @@ fi # check state file & TMP_FILEs [[ -r ${_STATE_FILE} ]] || { - # shellcheck disable=SC2188 - >${_STATE_FILE} + : >${_STATE_FILE} (( $? > 0 )) && { warn "failed to create new state file at ${_STATE_FILE}" return 1 } log "created new state file at ${_STATE_FILE}" } -# shellcheck disable=SC2188 ->${_TMP_INCL_FILE} +: >${_TMP_INCL_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP_INCL_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP_EXCL_FILE} +: >${_TMP_EXCL_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP_EXCL_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP1_FILE} +: >${_TMP1_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP1_FILE}" return 1 } -# shellcheck disable=SC2188 ->${_TMP2_FILE} +: >${_TMP2_FILE} (( $? > 0 )) && { warn "failed to create temporary file at ${_TMP2_FILE}" return 1