diff options
author | Ed Maste <emaste@FreeBSD.org> | 2017-05-30 15:51:48 +0000 |
---|---|---|
committer | Ed Maste <emaste@FreeBSD.org> | 2017-05-30 15:51:48 +0000 |
commit | bd1c3bad76c8484ae000d14b6f71daa2be40ac8b (patch) | |
tree | b2d06747690b8ec9af16bcdc55c514e784b6980e | |
parent | 8b07e00e9972b71957784209fd124dc6d08077f4 (diff) | |
download | src-bd1c3bad76c8484ae000d14b6f71daa2be40ac8b.tar.gz src-bd1c3bad76c8484ae000d14b6f71daa2be40ac8b.zip |
Notes
-rw-r--r-- | Makefile.inc1 | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/Makefile.inc1 b/Makefile.inc1 index a06b1797e244..e3b778d40dda 100644 --- a/Makefile.inc1 +++ b/Makefile.inc1 @@ -975,6 +975,22 @@ __installcheck_UGID: .PHONY fi .endfor .endif +# +# If installing over the running system (DESTDIR is / or unset) and the install +# includes rescue, try running rescue from the objdir as a sanity check. If +# rescue is not functional (e.g., because it depends on a system call not +# supported by the currently running kernel), abort the installation. +# +.if !make(distributeworld) && ${MK_RESCUE} != "no" && \ + (empty(DESTDIR) || ${DESTDIR} == "/") && empty(BYPASS_INSTALLCHECK_SH) +_installcheck_world: __installcheck_sh_check +__installcheck_sh_check: .PHONY + @if [ "`${OBJTREE}${.CURDIR}/rescue/rescue/rescue sh -c 'echo OK'`" != \ + OK ]; then \ + echo "rescue/sh check failed, installation aborted" >&2; \ + false; \ + fi +.endif # # Required install tools to be saved in a scratch dir for safety. |