summaryrefslogtreecommitdiff
path: root/distrib/miniroot
diff options
context:
space:
mode:
authorAlexander Bluhm <bluhm@cvs.openbsd.org>2014-05-05 00:09:17 +0000
committerAlexander Bluhm <bluhm@cvs.openbsd.org>2014-05-05 00:09:17 +0000
commitbf5450d0ea1660b447f57b0381bbaed63c89da91 (patch)
tree764509dfa2e9fde8fbe25e652328e21c58fa11c0 /distrib/miniroot
parentb2571c3cd1635ebd4e3b64112312ac3318bd0b30 (diff)
Redirecting stderr to /dev/null suppresses all errors. Instead use
the new status=none feature to make dd quiet. OK krw@ deraadt@
Diffstat (limited to 'distrib/miniroot')
-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() {