summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2017-11-05 10:29:25 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2017-11-05 10:29:25 +0000
commit2b3a46c29190b63ef7df6030edba6a9b2b1ec71a (patch)
tree05895ed99018e9b4368387efbe8f9367b668d782 /distrib/miniroot/install.sub
parentf68e9694a72eb5ed92202034f2586a2e441b3c04 (diff)
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@
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub18
1 files changed, 9 insertions, 9 deletions
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 <rpe@openbsd.org>
@@ -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