diff options
author | ajacoutot <ajacoutot@openbsd.org> | 2019-01-21 23:44:26 +0000 |
---|---|---|
committer | ajacoutot <ajacoutot@openbsd.org> | 2019-01-21 23:44:26 +0000 |
commit | f0c0efefe3fafbb5e496f220880c92b146ae4427 (patch) | |
tree | ca2f114b4a7a1516329fe53db26246fc746954e9 /usr.sbin/syspatch | |
parent | select(2), pselect(2), poll(2), ppoll(2): Support full timeout range. (diff) | |
download | wireguard-openbsd-f0c0efefe3fafbb5e496f220880c92b146ae4427.tar.xz wireguard-openbsd-f0c0efefe3fafbb5e496f220880c92b146ae4427.zip |
Warn user to reboot the machine when a new kernel is installed and let him know
where to look on the local machine for errata (/var/syspatch) so one can decide
if a reboot is needed.
ok Theos (tb@ deraadt@)
Diffstat (limited to 'usr.sbin/syspatch')
-rw-r--r-- | usr.sbin/syspatch/syspatch.sh | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/usr.sbin/syspatch/syspatch.sh b/usr.sbin/syspatch/syspatch.sh index 6c1adbb80d6..cd7c1ec7e6f 100644 --- a/usr.sbin/syspatch/syspatch.sh +++ b/usr.sbin/syspatch/syspatch.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: syspatch.sh,v 1.140 2019/01/16 22:29:12 ajacoutot Exp $ +# $OpenBSD: syspatch.sh,v 1.141 2019/01/21 23:44:26 ajacoutot Exp $ # # Copyright (c) 2016, 2017 Antoine Jacoutot <ajacoutot@openbsd.org> # @@ -232,11 +232,13 @@ trap_handler() if ${_KARL}; then echo -n "Relinking to create unique kernel..." if /usr/libexec/reorder_kernel; then - echo " done." + echo " done; reboot to load the new kernel" else _ret=$?; echo " failed!"; exit ${_ret} fi fi + + ${_PATCH_APPLIED} && echo "Errata can be reviewed under ${_PDIR}" } unpriv() @@ -274,6 +276,7 @@ _MIRROR=$(while read _line; do _line=${_line%%#*}; [[ -n ${_line} ]] && _MIRROR="${_MIRROR}/syspatch/${_KERNV[0]}/$(machine)" (($(sysctl -n hw.ncpufound) > 1)) && _BSDMP=true || _BSDMP=false +_PATCH_APPLIED=false _PDIR="/var/syspatch" _TMP=$(mktemp -d -p ${TMPDIR:-/tmp} syspatch.XXXXXXXXXX) _KARL=false @@ -306,5 +309,6 @@ if ((OPTIND == 1)); then _PATCHES=$(ls_missing) for _PATCH in ${_PATCHES}; do apply_patch ${_OSrev}-${_PATCH} + _PATCH_APPLIED=true done fi |