forked from mirrors/openup
use the correct kernel for boot time checks if using kernel relinking
This commit is contained in:
parent
6568d3da1d
commit
62e081abec
1 changed files with 7 additions and 2 deletions
9
openup
9
openup
|
|
@ -15,6 +15,7 @@
|
|||
# OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
#
|
||||
# Author: Antoine Jacoutot <antoine@mtier.org>
|
||||
# Maintainer: M:Tier Ltd. <info@mtier.org>
|
||||
|
||||
# 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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue