]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
add a rescue/sh sanity check before installworld on the running system
authoremaste <emaste@FreeBSD.org>
Tue, 30 May 2017 15:51:48 +0000 (15:51 +0000)
committeremaste <emaste@FreeBSD.org>
Tue, 30 May 2017 15:51:48 +0000 (15:51 +0000)
commit8e0d5e00c8dd8d2fe4bcf6876749e873d6e345c8
treeb2d06747690b8ec9af16bcdc55c514e784b6980e
parent96a186c5edc9bb16050762e49cb32886e8ed9a6f
add a rescue/sh sanity check before installworld on the running system

FreeBSD does not guarantee kernel forward compatibility (that is,
running a newer userland on an older kernel).  The documented upgrade
procedure specifies that installkernel should be performed, followed by
a reboot and then installworld.  As a sanity check when installing onto
the running system (DESTDIR is / or unset), attempt to run "sh echo OK"
using rescue from the objdir.  If rescue fails (e.g., because the system
has not been rebooted and the "old" kernel lacks a system call required
by the to-be-installed world), abort the installation.

This should avoid ino64 foot-shooting when the proper upgrade procedure
is not followed.

Reviewed by: allanjude, gjb, kib
MFC after: 2 weeks
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D10987
Makefile.inc1