diff options
author | 2017-10-11 09:02:31 +0000 | |
---|---|---|
committer | 2017-10-11 09:02:31 +0000 | |
commit | abadb7bd320dd6cdaddb5a592516eb916790f92a (patch) | |
tree | 04695fbc6b2f6cb1bee4ddde6f073893dcec8ddf | |
parent | Make the tc alpha blinkenlichten start by default. (diff) | |
download | wireguard-openbsd-abadb7bd320dd6cdaddb5a592516eb916790f92a.tar.xz wireguard-openbsd-abadb7bd320dd6cdaddb5a592516eb916790f92a.zip |
If $MODE.site fails, store random.seed and error out. Based on a diff
for auto$MODE by rpe in response to a question by mpi.
ok rpe mpi
-rw-r--r-- | distrib/miniroot/install.sub | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub index 992b9261a69..b1ebb756c6f 100644 --- a/distrib/miniroot/install.sub +++ b/distrib/miniroot/install.sub @@ -1,5 +1,5 @@ #!/bin/ksh -# $OpenBSD: install.sub,v 1.1038 2017/10/10 18:55:22 rpe Exp $ +# $OpenBSD: install.sub,v 1.1039 2017/10/11 09:02:31 tb Exp $ # # Copyright (c) 1997-2015 Todd Miller, Theo de Raadt, Ken Westerback # Copyright (c) 2015, Robert Peichaer <rpe@openbsd.org> @@ -2706,7 +2706,12 @@ __EOT # Email installer questions and their answers to root on next boot. prep_root_mail /tmp/i/$MODE.resp "$(hostname) $MODE response file" - [[ -x /mnt/$MODE.site ]] && chroot /mnt /$MODE.site + if [[ -x /mnt/$MODE.site ]]; then + if ! chroot /mnt /$MODE.site; then + store_random + err_exit "$MODE.site failed" + fi + fi # Store entropy for the next boot. store_random |