From 158781a83bd12b417c1285d7699d7e02bf8edf6f Mon Sep 17 00:00:00 2001 From: Robert Nagy Date: Tue, 30 May 2017 11:33:19 +0200 Subject: [PATCH] check the modification time of /bsd and compare that to the wakeup time --- openup | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/openup b/openup index 0d36dfe..205a51e 100755 --- a/openup +++ b/openup @@ -242,10 +242,10 @@ check_vuxml() { do_i_need_to_reboot() { # XXX hardcoded PKG_DBDIR - local kern_bp_time=$(stat -qf "%Um" /var/db/pkg/binpatch${_REL_INT}-${_ARCH}-kernel-*) + local kern_time=$(stat -qf "%Um" /bsd) local wake_up=$(sysctl -n kern.boottime) - if [ "${wake_up}" -lt "${kern_bp_time}" ]; then + if [ "${wake_up}" -lt "${kern_time}" ]; then pr_err pr_err "System must be rebooted after the last kernel update" pr_err @@ -267,7 +267,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=26 +_OPENUP_VERSION=27 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