summaryrefslogtreecommitdiff
path: root/distrib/hppa/install.md
diff options
context:
space:
mode:
authorKenneth R Westerback <krw@cvs.openbsd.org>2003-10-12 13:18:38 +0000
committerKenneth R Westerback <krw@cvs.openbsd.org>2003-10-12 13:18:38 +0000
commit5c96a7243a206f4cb127c4ec3f5e80431943c89c (patch)
tree57717743f67a9b80a7c1087a2ad7c2960e6a0b6d /distrib/hppa/install.md
parent1dbfe36e75a16bd934b3554b328f7468327e442f (diff)
Cleanup and shrinkage:
1) Eliminate 'WARNING: Disk xxx has no label.' message. When installing OpenBSD this is a normal condition not worth commenting on. From some discussion on hackers/icb. 2) Use consistant verbiage and case statement when checking the disklabel. 3) Consistantly suppress output of 'disklabel -W', reducing duplicate messages like '# using MBR partition ...' which are issued again when the 'disklabel -f ...' command is executed. 4) Usual code rectifications - eliminate extra {}'s, multiple echos elimination, etc.
Diffstat (limited to 'distrib/hppa/install.md')
-rw-r--r--distrib/hppa/install.md20
1 files changed, 6 insertions, 14 deletions
diff --git a/distrib/hppa/install.md b/distrib/hppa/install.md
index 2df4953be27..86a43d0b0b7 100644
--- a/distrib/hppa/install.md
+++ b/distrib/hppa/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.3 2003/09/21 02:11:42 krw Exp $
+# $OpenBSD: install.md,v 1.4 2003/10/12 13:18:37 krw Exp $
#
# machine dependent section of installation/upgrade script.
#
@@ -23,9 +23,7 @@ md_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
+ if grep "disk label corrupted" /tmp/checkfordisklabel; then
rval=2
fi >/dev/null 2>&1
@@ -33,23 +31,17 @@ md_checkfordisklabel() {
return $rval
}
-md_prep_disklabel()
-{
+md_prep_disklabel() {
local _disk=$1
md_checkfordisklabel $_disk
case $? in
- 0) ;;
- 1) echo WARNING: Disk $_disk has no label. You will be creating a new one.
- echo
- ;;
- 2) echo WARNING: Label on disk $_disk is corrupted. You will be repairing.
- echo
+ 2) echo "WARNING: Label on disk $_disk is corrupted. You will be repairing it.\n"
;;
esac
- disklabel -W ${_disk}
- disklabel -f /tmp/fstab.${_disk} -E ${_disk}
+ disklabel -W $_disk >/dev/null 2>&1
+ disklabel -f /tmp/fstab.$_disk -E $_disk
}
md_congrats() {