From bf5450d0ea1660b447f57b0381bbaed63c89da91 Mon Sep 17 00:00:00 2001 From: Alexander Bluhm Date: Mon, 5 May 2014 00:09:17 +0000 Subject: Redirecting stderr to /dev/null suppresses all errors. Instead use the new status=none feature to make dd quiet. OK krw@ deraadt@ --- distrib/miniroot/install.sub | 20 ++++++++++---------- 1 file 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() { -- cgit v1.2.3