summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbluhm <bluhm@openbsd.org>2014-05-05 00:09:16 +0000
committerbluhm <bluhm@openbsd.org>2014-05-05 00:09:16 +0000
commite8bc8e7fd0b9749d7d37729f2bd7559dc29a3519 (patch)
treeff8e88471c3a2d1e63343392129a723e6419ae74
parentImprove line wrapping for lines exceeding 80 chars. (diff)
downloadwireguard-openbsd-e8bc8e7fd0b9749d7d37729f2bd7559dc29a3519.tar.xz
wireguard-openbsd-e8bc8e7fd0b9749d7d37729f2bd7559dc29a3519.zip
Redirecting stderr to /dev/null suppresses all errors. Instead use
the new status=none feature to make dd quiet. OK krw@ deraadt@
-rw-r--r--distrib/miniroot/install.sub20
1 files changed, 10 insertions, 10 deletions
diff --git a/distrib/miniroot/install.sub b/distrib/miniroot/install.sub
index 8f4004a951a..84506ab2a37 100644
--- a/distrib/miniroot/install.sub
+++ b/distrib/miniroot/install.sub
@@ -1,4 +1,4 @@
-# $OpenBSD: install.sub,v 1.770 2014/05/04 13:08:39 krw Exp $
+# $OpenBSD: install.sub,v 1.771 2014/05/05 00:09:16 bluhm Exp $
#
# Copyright (c) 1997-2009 Todd Miller, Theo de Raadt, Ken Westerback
# All rights reserved.
@@ -1894,19 +1894,19 @@ upgrade_to64time_t() {
# Feed the random pool some entropy before we read from it
feed_random() {
- {
- (dmesg; cat $CGI_INFO /*.conf; sysctl; route -n show; df;
+ (dmesg; cat $CGI_INFO /*.conf; sysctl; route -n show; df;
ifconfig -A; hostname) >/dev/random 2>&1
- dd if=/mnt/var/db/host.random of=/dev/random bs=65536 count=1
- } >/dev/null 2>&1
+ if [[ -e /mnt/var/db/host.random ]]; then
+ dd if=/mnt/var/db/host.random of=/dev/random bs=65536 count=1 \
+ status=none
+ fi
}
store_random() {
- {
- dd if=/dev/random of=/mnt/var/db/host.random bs=65536 count=1
- dd if=/dev/random of=/mnt/etc/random.seed bs=512 count=1
- chmod 600 /mnt/var/db/host.random /mnt/etc/random.seed
- } >/dev/null 2>&1
+ dd if=/dev/random of=/mnt/var/db/host.random bs=65536 count=1 \
+ status=none
+ dd if=/dev/random of=/mnt/etc/random.seed bs=512 count=1 status=none
+ chmod 600 /mnt/var/db/host.random /mnt/etc/random.seed
}
finish_up() {