summaryrefslogtreecommitdiff
path: root/libexec
diff options
context:
space:
mode:
authorRobert Peichaer <rpe@cvs.openbsd.org>2018-05-01 09:45:40 +0000
committerRobert Peichaer <rpe@cvs.openbsd.org>2018-05-01 09:45:40 +0000
commit34844122cedbee7be5601b639dbce8c282ee8cee (patch)
treefa6cccec0b53d701b68c2c4f1bd01b151f1a566b /libexec
parent7186c729e122ae173c45d91cabb09f99377cafc7 (diff)
Add an explanation to relink.log what a failed checksum of /bsd
means and show how to re-enable KARL. Prodded by and OK deraadt Feedback and OK tb
Diffstat (limited to 'libexec')
-rw-r--r--libexec/reorder_kernel/reorder_kernel.sh14
1 files changed, 12 insertions, 2 deletions
diff --git a/libexec/reorder_kernel/reorder_kernel.sh b/libexec/reorder_kernel/reorder_kernel.sh
index a30b40adbed..ee14f7a096c 100644
--- a/libexec/reorder_kernel/reorder_kernel.sh
+++ b/libexec/reorder_kernel/reorder_kernel.sh
@@ -1,6 +1,6 @@
#!/bin/ksh
#
-# $OpenBSD: reorder_kernel.sh,v 1.4 2017/11/05 10:29:24 rpe Exp $
+# $OpenBSD: reorder_kernel.sh,v 1.5 2018/05/01 09:45:39 rpe Exp $
#
# Copyright (c) 2017 Robert Peichaer <rpe@openbsd.org>
#
@@ -50,7 +50,17 @@ if [[ -f $KERNEL_DIR.tgz ]]; then
rm -f $KERNEL_DIR.tgz
fi
-sha256 -C $SHA256 /bsd
+if ! sha256 -C $SHA256 /bsd; then
+ cat <<__EOF
+
+Failed to verify /bsd's checksum, therefore a randomly linked kernel (KARL)
+is not being built. KARL can be re-enabled for next boot by issuing as root:
+
+sha256 -h $SHA256 /bsd
+__EOF
+ # Trigger ERR trap
+ false
+fi
cd $KERNEL_DIR/$KERNEL
make newbsd