firmware: oops, to bring stderr into pipe move redirect here #4500

This commit is contained in:
Franco Fichtner 2021-01-16 13:37:56 +01:00
parent 62948343fe
commit 7d5b8bc24e
3 changed files with 8 additions and 8 deletions

View File

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

View File

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

View File

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