From 6c2b9839c23579435b422408ad0f3f115783e1d6 Mon Sep 17 00:00:00 2001 From: rpe Date: Sun, 2 Jul 2017 12:45:43 +0000 Subject: [PATCH] Shorter version of the same. based on a mail from Klemens Nanni on tech@ --- distrib/miniroot/install.sub | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index fa924258940..9ec0c782639 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1018 2017/07/02 11:53:35 rpe Exp $ +# $OpenBSD: install.sub,v 1.1019 2017/07/02 12:45:43 rpe Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer @@ -2635,13 +2635,9 @@ finish_up() { mv /mnt/bsd.mp /mnt/bsd fi - # Create/update kernel.SHA256 matching the just installed kernel. - # Fix path in kernel.SHA256 to ensure it references the kernel as /bsd. - ( - umask 077 - sha256 -h /mnt/var/db/kernel.SHA256 /mnt/bsd - sed -i 's,(/mnt,(,' /mnt/var/db/kernel.SHA256 - ) + # Write kernel.SHA256 matching the just installed kernel and fix path to + # 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 echo -n "Relinking to create unique kernel..." -- 2.20.1