1
0
Fork 0
forked from mirrors/openup

check the modification time of /bsd and compare that to the wakeup time

This commit is contained in:
Robert Nagy 2017-05-30 11:33:19 +02:00
commit 158781a83b

6
openup
View file

@ -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