From 2b3a46c29190b63ef7df6030edba6a9b2b1ec71a Mon Sep 17 00:00:00 2001 From: Robert Peichaer Date: Sun, 5 Nov 2017 10:29:25 +0000 Subject: Consolidate lib.so.*.a, ld.so.a and the kernel relink kit into one location under /usr/share/relink. Be more specific in src/etc/rc reorder_libs() what filesystems need r/w remount and ensure that their mount state is restored. Idea and positive feedback from deraadt@ OK aja@ tb@ --- distrib/miniroot/install.sub | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'distrib/miniroot/install.sub') diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index cdc929b8ed4..7b277e5dd01 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1042 2017/11/02 15:35:20 rpe Exp $ +# $OpenBSD: install.sub,v 1.1043 2017/11/05 10:29:24 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2641,8 +2641,8 @@ store_random() { # Final steps common for installs and upgrades. finish_up() { local _dev _mp _fstype _rest _d - local _compile=/mnt/usr/share/compile _kernel=${MDKERNEL:-GENERIC} - local _syspatch_archs="amd64 i386" + local _kernel_dir=/mnt/usr/share/relink/kernel + local _kernel=${MDKERNEL:-GENERIC} _syspatch_archs="amd64 i386" # Mount all known swap partitions. This gives systems with little # memory a better chance at running 'MAKEDEV all'. @@ -2706,16 +2706,16 @@ finish_up() { # ensure it references the kernel as /bsd. sha256 /mnt/bsd | (umask 077; sed 's,/mnt,,' >/mnt/var/db/kernel.SHA256) - if [[ -f $_compile.tgz ]]; then + if [[ -f $_kernel_dir.tgz ]]; then echo -n "Relinking to create unique kernel..." ( set -e - rm -rf $_compile - mkdir -m 700 -p $_compile - tar -C $_compile -xzf $_compile.tgz $_kernel - chroot /mnt /bin/ksh -e -c "cd ${_compile#/mnt}/$_kernel; \ + rm -rf $_kernel_dir + mkdir -m 700 -p $_kernel_dir + tar -C $_kernel_dir -xzf $_kernel_dir.tgz $_kernel + chroot /mnt /bin/ksh -e -c "cd ${_kernel_dir#/mnt}/$_kernel; \ make newbsd; make newinstall" - rm -f $_compile.tgz + rm -f $_kernel_dir.tgz ) >/dev/null 2>&1 && echo "done." || echo "failed." fi -- cgit v1.2.3