diff --git a/openup b/openup index f58a713..2fb4af5 100755 --- a/openup +++ b/openup @@ -15,6 +15,7 @@ # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. # # Author: Antoine Jacoutot +# Maintainer: M:Tier Ltd. # ChangeLog # http://cgit.mtier.org:8000/openup/log/ @@ -246,9 +247,13 @@ check_vuxml() { do_i_need_to_reboot() { # XXX hardcoded PKG_DBDIR - local kern_time=$(stat -qf "%Um" /bsd) + local kern_time local wake_up=$(sysctl -n kern.boottime) + # Check /bsd.booted first if available due to kernel relinking + [ -e /bsd.booted ] && kern_time=$(stat -qf "%Um" /bsd.booted) || \ + kern_time=$(stat -qf "%Um" /bsd) + if [ "${wake_up}" -lt "${kern_time}" ]; then pr_err pr_err "System must be rebooted after the last kernel update" @@ -271,7 +276,7 @@ fi set -A _REL -- $(sysctl -n kern.version | sed 's/^OpenBSD \([0-9]\.[0-9]\)\([^ ]*\).*/\1 \2/;q') _REL_INT="$(echo ${_REL[0]} | tr -d '.')" _OPENUP_MINREL=60 -_OPENUP_VERSION=28 +_OPENUP_VERSION=29 if [ -n "${_REL[1]}" -a "${_REL[1]}" != "-stable" ]; then _badrel=1; fi if [ "${_REL_INT}" -lt "${_OPENUP_MINREL}" ]; then _badrel=1; fi if [ -n "${_badrel}" ]; then