summaryrefslogtreecommitdiff
path: root/distrib/miniroot/install.sub
diff options
context:
space:
mode:
authorFlorian Obser <florian@cvs.openbsd.org>2019-05-02 06:19:34 +0000
committerFlorian Obser <florian@cvs.openbsd.org>2019-05-02 06:19:34 +0000
commit1c9f946d2d58f4a4866c7c1a17a618bd7081144f (patch)
treed63ce4f2fcd47b3e580afb336caf0407b639a5eb /distrib/miniroot/install.sub
parent0843a76edd145122240d04bcc676d5a9b9a66b61 (diff)
Keep SHA256.sig around on the installed / upgraded system.
It seems like sysupgrade(8) could use this to figure out if a new snapshot is available.
Diffstat (limited to 'distrib/miniroot/install.sub')
-rw-r--r--distrib/miniroot/install.sub7
1 files changed, 6 insertions, 1 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 97a33255df0..6a16e6694d0 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,5 +1,5 @@
#!/bin/ksh
-# $OpenBSD: install.sub,v 1.1118 2019/04/29 23:50:34 krw Exp $
+# $OpenBSD: install.sub,v 1.1119 2019/05/02 06:19:33 florian Exp $
#
# Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback
# Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org>
@@ -2775,6 +2775,11 @@ finish_up() {
# ensure it references the kernel as /bsd.
sha256 /mnt/bsd | (umask 077; sed 's,/mnt,,' >/mnt/var/db/kernel.SHA256)
+ # Keep SHA256.sig from installed sets for sysupgrade(8).
+ if [[ -f /tmp/SHA256.sig ]]; then
+ cp /tmp/SHA256.sig /mnt/var/db/installed.SHA256.sig
+ fi
+
if [[ -f $_kernel_dir.tgz ]]; then
echo -n "Relinking to create unique kernel..."
(