summaryrefslogtreecommitdiff
path: root/sys/arch/loongson/conf
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-21 15:34:08 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2019-06-21 15:34:08 +0000
commit010775d8b5fc57c45fd83df99e80074b4886d895 (patch)
tree009098061d2858e00d1ddd741cf38290f6edf558 /sys/arch/loongson/conf
parent0e5cf0108d7f4853d591487dd1dfb28a2a9d3316 (diff)
Further improve the filesystem stability of kernel installation by KARL.
Use install -F to instead of cp, for fsync(2). Coupled with the new sync(8) in the reorder_kernel script, the window for a incomplete /bsd file on-disk due to a crash has now shrunk substantially. Discussion with kettenis, millert and tedu
Diffstat (limited to 'sys/arch/loongson/conf')
-rw-r--r--sys/arch/loongson/conf/Makefile.loongson5
1 files changed, 2 insertions, 3 deletions
diff --git a/sys/arch/loongson/conf/Makefile.loongson b/sys/arch/loongson/conf/Makefile.loongson
index 438d3a0d8c9..80eac9f8d82 100644
--- a/sys/arch/loongson/conf/Makefile.loongson
+++ b/sys/arch/loongson/conf/Makefile.loongson
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.loongson,v 1.75 2019/04/14 14:07:06 deraadt Exp $
+# $OpenBSD: Makefile.loongson,v 1.76 2019/06/21 15:34:07 deraadt Exp $
# For instructions on building kernels consult the config(8) and options(4)
# manual pages.
@@ -157,8 +157,7 @@ hardlink-obsd:
[[ ! -f /bsd ]] || cmp -s bsd /bsd || ln -f /bsd /obsd
newinstall:
- umask 077 && cp bsd /nbsd && mv /nbsd /bsd && \
- sha256 -h /var/db/kernel.SHA256 /bsd
+ install -F -m 700 bsd /bsd && sha256 -h /var/db/kernel.SHA256 /bsd
install: update-link hardlink-obsd newinstall