firmware: remove backwards glue; improve reboot detection

This commit is contained in:
Franco Fichtner 2015-10-07 08:25:19 +02:00
parent 9fe4591d08
commit f7d9ca0dc1

View File

@ -118,22 +118,12 @@ if [ "$pkg_running" == "" ]; then
download_size="none"
fi
# XXX backwards compat
LOCAL=opnsense-update
if pkg query %n os-update > /dev/null; then
LOCAL=os-update
fi
REMOTE=opnsense-update
if pkg rquery %n os-update > /dev/null; then
REMOTE=os-update
fi
LQUERY=$(pkg query %v ${LOCAL})
RQUERY=$(pkg rquery %v ${REMOTE})
# only version change requires reboot
LQUERY=$(pkg query %v opnsense-update)
RQUERY=$(pkg rquery %v opnsense-update)
if [ "${LQUERY%%_*}" != "${RQUERY%%_*}" ]; then
upgrade_needs_reboot="1"
elif opnsense-update -c; then
upgrade_needs_reboot="1"
fi
# First check if there are new packages that need to be installed