diff --git a/target/scripts/build/packages.sh b/target/scripts/build/packages.sh index 3d0e05b5..c5d1f006 100644 --- a/target/scripts/build/packages.sh +++ b/target/scripts/build/packages.sh @@ -130,7 +130,7 @@ function _install_fail2ban curl -Lkso fail2ban.deb "${FAIL2BAN_DEB_URL}" curl -Lkso fail2ban.deb.asc "${FAIL2BAN_DEB_ASC_URL}" - FINGERPRINT=$(LANG=C gpg --verify fail2ban.deb.asc fail2ban.deb 2>&1 | sed -n 's#Primary key fingerprint: \(.*\)#\1#p') + FINGERPRINT=$(LANG=C gpg --verify fail2ban.deb.asc fail2ban.deb |& sed -n 's#Primary key fingerprint: \(.*\)#\1#p') if [[ -z ${FINGERPRINT} ]] then diff --git a/target/scripts/helpers/log.sh b/target/scripts/helpers/log.sh index b2331ae0..eb031f55 100644 --- a/target/scripts/helpers/log.sh +++ b/target/scripts/helpers/log.sh @@ -122,12 +122,12 @@ function _get_log_level_or_default { if [[ -n ${LOG_LEVEL+set} ]] then - printf '%s' "${LOG_LEVEL}" + echo "${LOG_LEVEL}" elif [[ -e /etc/dms-settings ]] then grep "^LOG_LEVEL=" /etc/dms-settings | cut -d "'" -f 2 else - printf 'info' + echo 'info' fi } diff --git a/target/scripts/helpers/utils.sh b/target/scripts/helpers/utils.sh index a706d229..6c0b3ae4 100644 --- a/target/scripts/helpers/utils.sh +++ b/target/scripts/helpers/utils.sh @@ -16,9 +16,7 @@ function _get_valid_lines_from_file # and it will return its value stored in /etc/dms-settings function _get_dms_env_value { - local VALUE - VALUE=$(grep "^${1}=" /etc/dms-settings | cut -d '=' -f 2) - printf '%s' "${VALUE:1:-1}" + grep "^${1}=" /etc/dms-settings | cut -d "'" -f 2 } # TODO: `chown -R 5000:5000 /var/mail` has existed since the projects first commit.