summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-25 19:18:43 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2001-01-25 19:18:43 +0000
commit98f744d503ff2a8b62f222bf4891f35ac4edceaa (patch)
tree0afda579eba1c3bd119b15efb3c65db8bcff88ba
parent8508265d49c9b3049cc792bb78efdacf0125b3a3 (diff)
egrep -a to permit working with binary data in dmesg
-rw-r--r--distrib/arc/ramdisk/install.md6
-rw-r--r--distrib/hp300/ramdisk/install.md8
-rw-r--r--distrib/i386/floppies/common/install.md6
-rw-r--r--distrib/mac68k/ramdisk/install.md6
-rw-r--r--distrib/mvme68k/ramdisk/install.md8
-rw-r--r--distrib/mvme88k/ramdisk/install.md6
-rw-r--r--distrib/pmax/install.md6
-rw-r--r--distrib/powerpc/ramdisk/install.md6
-rw-r--r--distrib/sparc/install.md5
9 files changed, 27 insertions, 30 deletions
diff --git a/distrib/arc/ramdisk/install.md b/distrib/arc/ramdisk/install.md
index 7c96aecb2d6..7e45b895f61 100644
--- a/distrib/arc/ramdisk/install.md
+++ b/distrib/arc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.14 1999/09/23 21:33:44 aaron Exp $
+# $OpenBSD: install.md,v 1.15 2001/01/25 19:18:37 deraadt Exp $
#
#
# Copyright rc) 1996 The NetBSD Foundation, Inc.
@@ -66,12 +66,12 @@ md_machine_model() {
md_get_diskdevs() {
# return available disk devices
- cat /kern/msgbuf | egrep "^[sw]d[0-9] " | cut -d" " -f1 | sort -u
+ egrep -a "^[sw]d[0-9] " /kern/msgbuf | cut -d" " -f1 | sort -u
}
md_get_cddevs() {
# return available CDROM devices
- cat /kern/msgbuf | egrep "^cd[0-9] " | cut -d" " -f1 | sort -u
+ egrep -a "^cd[0-9] " /kern/msgbuf | cut -d" " -f1 | sort -u
}
md_get_partition_range() {
diff --git a/distrib/hp300/ramdisk/install.md b/distrib/hp300/ramdisk/install.md
index c8db0fda409..2c5f7ada3f9 100644
--- a/distrib/hp300/ramdisk/install.md
+++ b/distrib/hp300/ramdisk/install.md
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: install.md,v 1.20 2000/10/31 16:32:45 millert Exp $
+# $OpenBSD: install.md,v 1.21 2001/01/25 19:18:37 deraadt Exp $
# $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -113,13 +113,13 @@ md_machine_arch() {
md_get_diskdevs() {
# return available disk devices
- egrep "^hd[0-9]*:." < /kern/msgbuf | cutword -t: 1 | sort -u
- egrep "^sd[0-9]*:.*cylinders" < /kern/msgbuf | cutword -t: 1 | sort -u
+ egrep -a "^hd[0-9]*:." < /kern/msgbuf | cutword -t: 1 | sort -u
+ egrep -a "^sd[0-9]*:.*cylinders" < /kern/msgbuf | cutword -t: 1 | sort -u
}
md_get_cddevs() {
# return available CD-ROM devices
- egrep "sd[0-9]*:.*CD-ROM" < /kern/msgbuf | cutword -t: 1 | sort -u
+ egrep -a "sd[0-9]*:.*CD-ROM" < /kern/msgbuf | cutword -t: 1 | sort -u
}
md_get_partition_range() {
diff --git a/distrib/i386/floppies/common/install.md b/distrib/i386/floppies/common/install.md
index 321d4ddcac3..f2a08d38a36 100644
--- a/distrib/i386/floppies/common/install.md
+++ b/distrib/i386/floppies/common/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.9 2001/01/06 20:17:53 millert Exp $
+# $OpenBSD: install.md,v 1.10 2001/01/25 19:18:38 deraadt Exp $
#
#
# Copyright rc) 1996 The NetBSD Foundation, Inc.
@@ -61,12 +61,12 @@ md_machine_arch() {
md_get_diskdevs() {
# return available disk devices
- bsort `cat /kern/msgbuf | egrep "^[sw]d[0-9]+ " | cutword 1`
+ bsort `egrep -a "^[sw]d[0-9]+ " /kern/msgbuf | cutword 1`
}
md_get_cddevs() {
# return available CDROM devices
- bsort `cat /kern/msgbuf | egrep "^cd[0-9]+ " | cutword 1`
+ bsort `egrep -a "^cd[0-9]+ " /kern/msgbuf | cutword 1`
}
md_get_partition_range() {
diff --git a/distrib/mac68k/ramdisk/install.md b/distrib/mac68k/ramdisk/install.md
index 65a040b49c8..dfb1f63dc17 100644
--- a/distrib/mac68k/ramdisk/install.md
+++ b/distrib/mac68k/ramdisk/install.md
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# $OpenBSD: install.md,v 1.3 1999/09/03 18:55:28 deraadt Exp $
+# $OpenBSD: install.md,v 1.4 2001/01/25 19:18:39 deraadt Exp $
# $NetBSD: install.md,v 1.1.2.4 1996/08/26 15:45:14 gwr Exp $
#
# Copyright (c) 1996 The NetBSD Foundation, Inc.
@@ -113,12 +113,12 @@ md_machine_arch() {
md_get_diskdevs() {
# return available disk devices
- cat /kern/msgbuf | egrep "^sd[0-9]+ " | cutword 1 | sort -u
+ egrep -a "^sd[0-9]+ " /kern/msgbuf | cutword 1 | sort -u
}
md_get_cddevs() {
# return available CD-ROM devices
- cat /kern/msgbuf | egrep "^cd[0-9]+ " | cutword 1 | sort -u
+ egrep -a "^cd[0-9]+ " /kern/msgbuf | cutword 1 | sort -u
}
md_get_partition_range() {
diff --git a/distrib/mvme68k/ramdisk/install.md b/distrib/mvme68k/ramdisk/install.md
index 6da77a0620d..c7cb784b1ea 100644
--- a/distrib/mvme68k/ramdisk/install.md
+++ b/distrib/mvme68k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.10 2000/01/24 04:50:26 smurph Exp $
+# $OpenBSD: install.md,v 1.11 2001/01/25 19:18:40 deraadt Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -81,14 +81,12 @@ md_machine_arch() {
md_get_diskdevs() {
# return available disk devices
- cat /kern/msgbuf | egrep "^[sw]d[0-9]|ofdisk[0-9] " | sed -e "s/[ :(].*//" | sort -u
- # egrep "^sd[0-9] " < /kern/msgbuf
+ egrep -a "^[sw]d[0-9]|ofdisk[0-9] " /kern/msgbuf | sed -e "s/[ :(].*//" | sort -u
}
md_get_cddevs() {
# return available CDROM devices
- cat /kern/msgbuf | egrep "^cd[0-9] " | sed -e "s/[ :(].*//" | sort -u
- # egrep "^cd[0-9] " < /kern/msgbuf
+ egrep -a "^cd[0-9] " /kern/msgbuf | sed -e "s/[ :(].*//" | sort -u
}
md_get_ifdevs() {
diff --git a/distrib/mvme88k/ramdisk/install.md b/distrib/mvme88k/ramdisk/install.md
index 75559d6837b..a070ad5d7d8 100644
--- a/distrib/mvme88k/ramdisk/install.md
+++ b/distrib/mvme88k/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.5 2000/01/24 04:51:55 smurph Exp $
+# $OpenBSD: install.md,v 1.6 2001/01/25 19:18:40 deraadt Exp $
# Copyright (c) 1996 The NetBSD Foundation, Inc.
# All rights reserved.
#
@@ -57,11 +57,11 @@ md_machine_arch() {
}
md_get_diskdevs() {
- egrep "^sd[0-9] " < /kern/msgbuf
+ egrep -a "^sd[0-9] " < /kern/msgbuf
}
md_get_cddevs() {
- egrep "^cd[0-9] " < /kern/msgbuf
+ egrep -a "^cd[0-9] " < /kern/msgbuf
}
md_get_ifdevs() {
diff --git a/distrib/pmax/install.md b/distrib/pmax/install.md
index 28690f58bb9..1378ab3a2d9 100644
--- a/distrib/pmax/install.md
+++ b/distrib/pmax/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.14 1999/10/12 06:02:01 maja Exp $
+# $OpenBSD: install.md,v 1.15 2001/01/25 19:18:41 deraadt Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -106,12 +106,12 @@ md_machine_arch() {
md_get_diskdevs() {
# return available disk devices
- grep "^rz[0-6] " < /kern/msgbuf | cut -d" " -f1 | sort -u
+ grep -a "^rz[0-6] " < /kern/msgbuf | cut -d" " -f1 | sort -u
}
md_get_cddevs() {
# return available CDROM devices
- grep "^rz[0-6] " < /kern/msgbuf | cut -d" " -f1 | sort -u
+ grep -a "^rz[0-6] " < /kern/msgbuf | cut -d" " -f1 | sort -u
}
md_get_ifdevs() {
diff --git a/distrib/powerpc/ramdisk/install.md b/distrib/powerpc/ramdisk/install.md
index 31360cb9711..c54a8a69ca1 100644
--- a/distrib/powerpc/ramdisk/install.md
+++ b/distrib/powerpc/ramdisk/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.16 2000/10/17 15:21:59 deraadt Exp $
+# $OpenBSD: install.md,v 1.17 2001/01/25 19:18:41 deraadt Exp $
#
#
# Copyright rc) 1996 The NetBSD Foundation, Inc.
@@ -61,12 +61,12 @@ md_machine_arch() {
md_get_diskdevs() {
# return available disk devices
- bsort `cat /kern/msgbuf | egrep "^[sw]d[0-9]+ " | cutword 1`
+ bsort `cat /kern/msgbuf | egrep -a "^[sw]d[0-9]+ " | cutword 1`
}
md_get_cddevs() {
# return available CDROM devices
- bsort `cat /kern/msgbuf | egrep "^cd[0-9]+ " | cutword 1`
+ bsort `cat /kern/msgbuf | egrep -a "^cd[0-9]+ " | cutword 1`
}
md_get_partition_range() {
diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md
index 3a75fe979ad..19a1f4ba189 100644
--- a/distrib/sparc/install.md
+++ b/distrib/sparc/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.32 2000/04/24 16:33:44 millert Exp $
+# $OpenBSD: install.md,v 1.33 2001/01/25 19:18:42 deraadt Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -42,7 +42,6 @@
#
# Machine-dependent install sets
-MSGBUF=/kern/msgbuf
HOSTNAME=/kern/hostname
MDSETS="kernel xbin xman xinc xcon"
@@ -90,7 +89,7 @@ __EOT
md_get_msgbuf() {
# Only want to see one boot's worth of info
- sed -n -f /dev/stdin $MSGBUF <<- OOF
+ sed -n -f /dev/stdin /kern/msgbuf <<- OOF
/^OpenBSD /h
/^OpenBSD /!H
\${