OK, here we go: config.xml did *not* have opnsense-business anywhere.
I tried the upgrade process again, and, this time, I was bold and chose "y" despite the scary sounding error message about pkg being called with the wrong parameters and... it worked. First it downgraded to 22.7.11 and repeating the upgrade process eventually upgraded it to 23.1.6. :-)
Naturally, I wanted to find out *why* that scary pkg message turned up, and the root cause seems to be the following code in scripts/firmware/reboot.sh:
Apparently test's -a doesn't short-circuit, so, when RQUERY is empty (due to failing to fetch a server-side file?), pkg version still displays error output. My sh skills are a bit rusty, but I see a few ways to fix that:
Best regards and thanks for all the great work on opnsense
Heinzi
I tried the upgrade process again, and, this time, I was bold and chose "y" despite the scary sounding error message about pkg being called with the wrong parameters and... it worked. First it downgraded to 22.7.11 and repeating the upgrade process eventually upgraded it to 23.1.6. :-)
Naturally, I wanted to find out *why* that scary pkg message turned up, and the root cause seems to be the following code in scripts/firmware/reboot.sh:
Code Select
if [ -n "${LQUERY}" -a -n "${RQUERY}" -a \
"$(${PKG} version -t ${LQUERY} ${RQUERY})" = "<" ]; then
echo ${RQUERY%%_*}
fi
Apparently test's -a doesn't short-circuit, so, when RQUERY is empty (due to failing to fetch a server-side file?), pkg version still displays error output. My sh skills are a bit rusty, but I see a few ways to fix that:
- Use short-circuiting tests instead: if [ -n "${LQUERY} ] && [ -n "${RQUERY}" ] && ...
- Quote the parameters: Double quotes can be nested inside $(...), so just putting double quotes around ${LQUERY} and ${RQUERY} should work.
- Suppress stderr output from pkg.
Best regards and thanks for all the great work on opnsense
Heinzi