=================================================================== RCS file: /cvs/openbsd/update_openbsd/update_openbsd,v retrieving revision 1.118 retrieving revision 1.124 diff -u -r1.118 -r1.124 --- openbsd/update_openbsd/update_openbsd 2018/12/16 21:10:00 1.118 +++ openbsd/update_openbsd/update_openbsd 2019/03/31 22:10:01 1.124 @@ -1,5 +1,5 @@ #!/bin/sh -# $AFresh1: update_openbsd,v 1.117 2018/12/16 20:57:49 andrew Exp $ +# $AFresh1: update_openbsd,v 1.123 2019/03/02 01:05:59 andrew Exp $ # # Copyright (c) 2012 Andrew Fresh # @@ -172,7 +172,7 @@ if [ X"" != X"${MIRROR}" -a X"" == X"${_v}" ]; then if [ X"No" != X"${FORCE_DIR}" ]; then _dir=${FORCE_DIR} - elif sysctl kern.version | grep -q -- '-current '; then + elif sysctl kern.version | grep -q -e '-current ' -e '-beta '; then _dir=snapshots FORCE_DIR=snapshots else @@ -649,6 +649,9 @@ . ${HOME}/.update_openbsdrc fi +if [ -z "$MIRROR" -a -e /etc/installurl ]; then + MIRROR=$(< /etc/installurl) +fi MIRROR=${MIRROR:=http://cdn.openbsd.org/pub/OpenBSD} FTP_CMD=${FTP_CMD:=ftp -V} @@ -763,6 +766,11 @@ echo Removing /sbin/oreboot rm -f /sbin/oreboot fi + + echo "===> Relinking to create unique kernel..." + sha256 -h /var/db/kernel.SHA256 /bsd + /usr/libexec/reorder_kernel + update_etc OPENUP=$( which openup 2>/dev/null ) @@ -770,6 +778,10 @@ echo "==> UPDATING WITH $OPENUP" $OPENUP else + if [ X"snapshots" != X"$FORCE_DIR" ]; then + echo '==> RUNNING SYSPATCH' + syspatch + fi echo '==> UPDATING PACKAGES' pkg_add -u fi