diff options
-rw-r--r-- | distrib/alpha/common/install.md | 13 | ||||
-rw-r--r-- | distrib/hp300/ramdisk/install.md | 13 | ||||
-rw-r--r-- | distrib/hppa/install.md | 13 | ||||
-rw-r--r-- | distrib/i386/common/install.md | 13 | ||||
-rw-r--r-- | distrib/mac68k/ramdisk/install.md | 13 | ||||
-rw-r--r-- | distrib/macppc/ramdisk/install.md | 11 | ||||
-rw-r--r-- | distrib/mvme68k/ramdisk/install.md | 7 | ||||
-rw-r--r-- | distrib/mvme88k/ramdisk/install.md | 7 | ||||
-rw-r--r-- | distrib/mvmeppc/ramdisk/install.md | 11 | ||||
-rw-r--r-- | distrib/sparc/install.md | 13 | ||||
-rw-r--r-- | distrib/sparc64/common/install.md | 13 | ||||
-rw-r--r-- | distrib/vax/install.md | 13 |
12 files changed, 66 insertions, 74 deletions
diff --git a/distrib/alpha/common/install.md b/distrib/alpha/common/install.md index 329fbe56cf7..e14c782009a 100644 --- a/distrib/alpha/common/install.md +++ b/distrib/alpha/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.16 2003/09/19 01:05:34 krw Exp $ +# $OpenBSD: install.md,v 1.17 2003/09/21 02:11:42 krw Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. @@ -59,18 +59,17 @@ md_installboot() { fi } +# $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 diff --git a/distrib/hp300/ramdisk/install.md b/distrib/hp300/ramdisk/install.md index d8ffe23aca5..ad4b051c8d6 100644 --- a/distrib/hp300/ramdisk/install.md +++ b/distrib/hp300/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.35 2002/11/07 01:28:52 krw Exp $ +# $OpenBSD: install.md,v 1.36 2003/09/21 02:11:42 krw Exp $ # $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $ # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -56,18 +56,17 @@ md_installboot() { echo "done." } +# $1 is the disk to check md_checkfordisklabel() { - # $1 is the disk to check - local rval + local rval=0 + + disklabel -r $1 >/dev/null 2>/tmp/checkfordisklabel - disklabel -r $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 diff --git a/distrib/hppa/install.md b/distrib/hppa/install.md index e161a378233..2df4953be27 100644 --- a/distrib/hppa/install.md +++ b/distrib/hppa/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.2 2003/09/18 00:02:42 krw Exp $ +# $OpenBSD: install.md,v 1.3 2003/09/21 02:11:42 krw Exp $ # # machine dependent section of installation/upgrade script. # @@ -17,18 +17,17 @@ md_installboot() { echo "done." } +# $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 diff --git a/distrib/i386/common/install.md b/distrib/i386/common/install.md index d6f49d87c07..661bf079462 100644 --- a/distrib/i386/common/install.md +++ b/distrib/i386/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2003/08/16 20:37:24 krw Exp $ +# $OpenBSD: install.md,v 1.19 2003/09/21 02:11:42 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -103,18 +103,17 @@ md_installboot() { echo "done." } +# $1 is the disk to check md_checkfordisklabel() { - # $1 is the disk to check - local rval + local rval=0 + + disklabel -r $1 >/dev/null 2>/tmp/checkfordisklabel - disklabel -r $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 diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md index 109e336e908..a1bc567d3b3 100644 --- a/distrib/mac68k/ramdisk/install.md +++ b/distrib/mac68k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.19 2002/11/07 01:28:52 krw Exp $ +# $OpenBSD: install.md,v 1.20 2003/09/21 02:11:42 krw Exp $ # # Copyright (c) 2002, Miodrag Vallat. # All rights reserved. @@ -75,20 +75,19 @@ md_installboot() { : } +# $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 OpenBSD or MacOS disk label" /tmp/checkfordisklabel; then rval=1 elif grep "disk label corrupted" /tmp/checkfordisklabel; then rval=2 elif grep " HFS " /tmp/checkfordisklabel; then rval=3 - else - rval=0 - fi + fi >/dev/null 2>&1 rm -f /tmp/checkfordisklabel return $rval diff --git a/distrib/macppc/ramdisk/install.md b/distrib/macppc/ramdisk/install.md index ad7511046ba..fe8fe5995d9 100644 --- a/distrib/macppc/ramdisk/install.md +++ b/distrib/macppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.20 2003/09/19 02:40:11 krw Exp $ +# $OpenBSD: install.md,v 1.21 2003/09/21 02:11:42 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -147,7 +147,7 @@ __EOT } md_checkforMBRdisklabel() { - local _disk=$1 + local _disk=$1 rval=0 ask "Are you *sure* you want to put a MBR disklabel on the disk?" n case $resp in @@ -175,14 +175,13 @@ __EOT ;; esac - disklabel -r $_disk > /dev/null 2> /tmp/checkfordisklabel + disklabel -r $_disk >/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 diff --git a/distrib/mvme68k/ramdisk/install.md b/distrib/mvme68k/ramdisk/install.md index 9010ac5c026..aa3637e07ff 100644 --- a/distrib/mvme68k/ramdisk/install.md +++ b/distrib/mvme68k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.24 2003/09/09 18:45:50 miod Exp $ +# $OpenBSD: install.md,v 1.25 2003/09/21 02:11:42 krw Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -50,16 +50,17 @@ md_installboot() { /mnt/usr/mdec/installboot -v /mnt/bootsd /mnt/usr/mdec/bootxx /dev/r${1}a } +# $1 is the disk to check md_checkfordisklabel() { - # $1 is the disk to check local rval=0 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 - fi + fi >/dev/null 2>&1 rm -f /tmp/checkfordisklabel return $rval diff --git a/distrib/mvme88k/ramdisk/install.md b/distrib/mvme88k/ramdisk/install.md index 6f14c8c3352..f3a7df0f223 100644 --- a/distrib/mvme88k/ramdisk/install.md +++ b/distrib/mvme88k/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.20 2003/09/09 18:45:52 miod Exp $ +# $OpenBSD: install.md,v 1.21 2003/09/21 02:11:42 krw Exp $ # Copyright (c) 1996 The NetBSD Foundation, Inc. # All rights reserved. # @@ -50,16 +50,17 @@ md_installboot() { /mnt/usr/mdec/installboot -v /mnt/bootsd /mnt/usr/mdec/bootxx /dev/r${1}a } +# $1 is the disk to check md_checkfordisklabel() { - # $1 is the disk to check local rval=0 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 - fi + fi >/dev/null 2>&1 rm -f /tmp/checkfordisklabel return $rval diff --git a/distrib/mvmeppc/ramdisk/install.md b/distrib/mvmeppc/ramdisk/install.md index 7c45b5674ce..70e6d7a04bc 100644 --- a/distrib/mvmeppc/ramdisk/install.md +++ b/distrib/mvmeppc/ramdisk/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.18 2003/09/19 02:40:11 krw Exp $ +# $OpenBSD: install.md,v 1.19 2003/09/21 02:11:42 krw Exp $ # # # Copyright (c) 1996 The NetBSD Foundation, Inc. @@ -147,7 +147,7 @@ __EOT } md_checkforMBRdisklabel() { - local _disk=$1 + local _disk=$1 rval=0 ask "Are you *sure* you want to put a MBR disklabel on the disk?" n case $resp in @@ -175,14 +175,13 @@ __EOT ;; esac - disklabel -r $_disk > /dev/null 2> /tmp/checkfordisklabel + disklabel -r $_disk >/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 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 diff --git a/distrib/sparc64/common/install.md b/distrib/sparc64/common/install.md index 8368b856668..75832fac486 100644 --- a/distrib/sparc64/common/install.md +++ b/distrib/sparc64/common/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.16 2003/09/19 01:05:34 krw Exp $ +# $OpenBSD: install.md,v 1.17 2003/09/21 02:11:42 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -76,18 +76,17 @@ md_installboot() { cp ${_prefix}/ofwboot /mnt/ofwboot } +# $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 diff --git a/distrib/vax/install.md b/distrib/vax/install.md index 52fd09d756c..261cafc3073 100644 --- a/distrib/vax/install.md +++ b/distrib/vax/install.md @@ -1,4 +1,4 @@ -# $OpenBSD: install.md,v 1.20 2002/11/07 01:28:52 krw Exp $ +# $OpenBSD: install.md,v 1.21 2003/09/21 02:11:42 krw Exp $ # $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $ # # @@ -54,18 +54,17 @@ md_installboot() { /sbin/disklabel -B $1 } +# $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 |