summaryrefslogtreecommitdiff
path: root/distrib/sparc/install.md
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2003-09-21 02:11:43 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2003-09-21 02:11:43 +0000
commit023bd3f8cfa6e289ad653beedceb21dcbcd02bb3 (patch)
tree6a7370386a31fe3abb984d588f330fb27b38e9aa /distrib/sparc/install.md
parente70354929e99fcb6c23584851628242c3f4a4f22 (diff)
Fix extraneous display of grep output when searching disklabel output for
error information. Previously things like: disklabel: no disk label WARNING: Disk wd0 has no disk label. You will be creating a new one. would be printed. Now the 'disklabel: no disk label' message is correctly sent to /dev/null. Take the opportunity to clean up a bit of code and formatting, making all the md_checkfordisklabel() functions as identical as possible.
Diffstat (limited to 'distrib/sparc/install.md')
-rw-r--r--distrib/sparc/install.md13
1 files changed, 6 insertions, 7 deletions
diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md
index b52b347fd8c..e45b9bc5b23 100644
--- a/distrib/sparc/install.md
+++ b/distrib/sparc/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.48 2003/09/19 01:05:34 krw Exp $
+# $OpenBSD: install.md,v 1.49 2003/09/21 02:11:42 krw Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -66,18 +66,17 @@ md_installboot() {
installboot -v /mnt/boot ${_prefix}/bootxx ${_rawdev}
}
+# $1 is the disk to check
md_checkfordisklabel() {
- # $1 is the disk to check
- local rval
+ local rval=0
+
+ disklabel $1 >/dev/null 2>/tmp/checkfordisklabel
- disklabel $1 > /dev/null 2> /tmp/checkfordisklabel
if grep "no disk label" /tmp/checkfordisklabel; then
rval=1
elif grep "disk label corrupted" /tmp/checkfordisklabel; then
rval=2
- else
- rval=0
- fi
+ fi >/dev/null 2>&1
rm -f /tmp/checkfordisklabel
return $rval