From 7d5b8bc24e5be70f91ede718cfd45a5b8bd29d1f Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Sat, 16 Jan 2021 13:37:56 +0100 Subject: [PATCH] firmware: oops, to bring stderr into pipe move redirect here #4500 --- src/etc/rc.firmware.subr | 10 +++++----- src/opnsense/scripts/firmware/health.sh | 4 ++-- src/opnsense/scripts/firmware/security.sh | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/etc/rc.firmware.subr b/src/etc/rc.firmware.subr index b33602cc2..4a6df4e50 100755 --- a/src/etc/rc.firmware.subr +++ b/src/etc/rc.firmware.subr @@ -48,17 +48,17 @@ echo "***GOT REQUEST TO UPGRADE***" >> ${LOCKFILE} if [ -z "${RELEASE}" ]; then # upgrade all packages if possible ${TEE} ${LOCKFILE} < ${PIPEFILE} & - opnsense-update -p 2>&1 > ${PIPEFILE} + opnsense-update -p > ${PIPEFILE} 2>&1 # trigger a webgui restart to cope with changes ${TEE} ${LOCKFILE} < ${PIPEFILE} & - /usr/local/etc/rc.restart_webgui 2>&1 > ${PIPEFILE} + /usr/local/etc/rc.restart_webgui > ${PIPEFILE} 2>&1 # if we can update base, we'll do that as well ${TEE} ${LOCKFILE} < ${PIPEFILE} & - if opnsense-update -c 2>&1 > ${PIPEFILE}; then + if opnsense-update -c > ${PIPEFILE} 2>&1; then ${TEE} ${LOCKFILE} < ${PIPEFILE} & - if opnsense-update -bk 2>&1 > ${PIPEFILE}; then + if opnsense-update -bk > ${PIPEFILE} 2>&1; then echo '***REBOOT***' >> ${LOCKFILE} sleep 5 /usr/local/etc/rc.reboot @@ -67,7 +67,7 @@ if [ -z "${RELEASE}" ]; then else # upgrade to a major release ${TEE} ${LOCKFILE} < ${PIPEFILE} & - if opnsense-update -ur ${RELEASE} 2>&1 > ${PIPEFILE}; then + if opnsense-update -ur ${RELEASE} > ${PIPEFILE} 2>&1; then echo '***REBOOT***' >> ${LOCKFILE} sleep 5 /usr/local/etc/rc.reboot diff --git a/src/opnsense/scripts/firmware/health.sh b/src/opnsense/scripts/firmware/health.sh index 7ffdc7fc0..748860955 100755 --- a/src/opnsense/scripts/firmware/health.sh +++ b/src/opnsense/scripts/firmware/health.sh @@ -243,12 +243,12 @@ set_check base ${TEE} ${LOCKFILE} < ${PIPEFILE} & echo ">>> Check for missing package dependencies" > ${PIPEFILE} ${TEE} ${LOCKFILE} < ${PIPEFILE} & -pkg check -dan 2>&1 > ${PIPEFILE} +pkg check -dan > ${PIPEFILE} 2>&1 ${TEE} ${LOCKFILE} < ${PIPEFILE} & echo ">>> Check for missing or altered package files" > ${PIPEFILE} ${TEE} ${LOCKFILE} < ${PIPEFILE} & -pkg check -sa 2>&1 > ${PIPEFILE} +pkg check -sa > ${PIPEFILE} 2>&1 core_check diff --git a/src/opnsense/scripts/firmware/security.sh b/src/opnsense/scripts/firmware/security.sh index b0d6596f5..46c34252f 100755 --- a/src/opnsense/scripts/firmware/security.sh +++ b/src/opnsense/scripts/firmware/security.sh @@ -36,6 +36,6 @@ echo "***GOT REQUEST TO AUDIT SECURITY***" >> ${LOCKFILE} ${TEE} ${LOCKFILE} < ${PIPEFILE} & echo "Currently running $(opnsense-version) at $(date)" > ${PIPEFILE} ${TEE} ${LOCKFILE} < ${PIPEFILE} & -pkg audit -F 2>&1 > ${PIPEFILE} +pkg audit -F > ${PIPEFILE} 2>&1 sleep 1 # give the system time to flush the buffer to console echo '***DONE***' >> ${LOCKFILE}