From 780bb10f2c468d9baf64db5d1041a819a36dd4d8 Mon Sep 17 00:00:00 2001 From: Franco Fichtner Date: Tue, 25 Apr 2023 08:00:35 +0200 Subject: [PATCH] firmware: fix execution when not possible PR: https://forum.opnsense.org/index.php?topic=33593.0 --- src/opnsense/scripts/firmware/reboot.sh | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/opnsense/scripts/firmware/reboot.sh b/src/opnsense/scripts/firmware/reboot.sh index b91004180..a4c24a02b 100755 --- a/src/opnsense/scripts/firmware/reboot.sh +++ b/src/opnsense/scripts/firmware/reboot.sh @@ -53,9 +53,10 @@ RQUERY=$(${PKG} rquery %v ${COREPKG} 2> /dev/null) # core package is available. We want to use it to display additional # information in the shell menu including the matching changelog. -if [ -n "${LQUERY}" -a -n "${RQUERY}" -a \ - "$(${PKG} version -t ${LQUERY} ${RQUERY})" = "<" ]; then - echo ${RQUERY%%_*} +if [ -n "${LQUERY}" -a -n "${RQUERY}" ]; then + if [ "$(${PKG} version -t ${LQUERY} ${RQUERY})" = "<" ]; then + echo ${RQUERY%%_*} + fi fi # success is reboot: