summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorgrr <grr@cvs.openbsd.org>1997-05-16 02:09:39 +0000
committergrr <grr@cvs.openbsd.org>1997-05-16 02:09:39 +0000
commit554909a38bd27b49412fc41786056bebc0352ed3 (patch)
treea91b9550bdd32e39ece1b02251cc01b85a5b61cf
parent8fc5c24c4df117c8bea466ca6c2eba77acbc7d54 (diff)
don't mount a mfs /tmp if /tmp is already writable...
-rw-r--r--distrib/sparc/install.md29
1 files changed, 18 insertions, 11 deletions
diff --git a/distrib/sparc/install.md b/distrib/sparc/install.md
index 052d919749b..d945ac110ba 100644
--- a/distrib/sparc/install.md
+++ b/distrib/sparc/install.md
@@ -1,4 +1,4 @@
-# $OpenBSD: install.md,v 1.9 1997/05/14 21:39:15 millert Exp $
+# $OpenBSD: install.md,v 1.10 1997/05/16 02:09:38 grr Exp $
# $NetBSD: install.md,v 1.3.2.5 1996/08/26 15:45:28 gwr Exp $
#
#
@@ -43,6 +43,7 @@
# Machine-dependent install sets
MDSETS="xbin xman xinc xcon"
+MSGBUF=/kern/msgbuf
md_set_term() {
if [ ! -z "$TERM" ]; then
@@ -59,18 +60,20 @@ md_makerootwritable() {
# /tmp is the mount point
# 2048 is the size in DEV_BIZE blocks
- umount /tmp > /dev/null 2>&1
- if ! mount_mfs -s 2048 swap /tmp ; then
- cat << \__mfs_failed_1
+ if [ ! -w /tmp ]; then
+ umount /tmp > /dev/null 2>&1
+ if ! mount_mfs -s 2048 swap /tmp ; then
+ cat << \__mfs_failed_1
FATAL ERROR: Can't mount the memory filesystem.
__mfs_failed_1
- exit
- fi
+ exit
+ fi
- # Bleh. Give mount_mfs a chance to DTRT.
- sleep 2
+ # Bleh. Give mount_mfs a chance to DTRT.
+ sleep 2
+ fi
}
md_machine_arch() {
@@ -79,17 +82,21 @@ md_machine_arch() {
md_get_diskdevs() {
# return available disk devices
- dmesg | egrep "(^sd[0-9] |^x[dy][0-9] )" | cut -d" " -f1 | sort -u
+ # dmesg | egrep "(^sd[0-9] |^x[dy][0-9] )" | cut -d" " -f1 | sort -u
+ sed -n -e '1,/^Copyright /d' -e '/^sd[0-9]/{s/ .*//;p;}' -e '/^x[dy][0-9]/{s/ .*//;p;}' \
+ < $MSGBUF
}
md_get_cddevs() {
# return available CDROM devices
- dmesg | grep "^cd[0-9] " | cut -d" " -f1 | sort -u
+ # dmesg | grep "^cd[0-9] " | cut -d" " -f1 | sort -u
+ sed -n -e '1,/^Copyright /d' -e '/^cd[0-9]/{s/ .*//;p;q;}' < $MSGBUF
}
md_get_ifdevs() {
# return available network devices
- dmesg | egrep "(^le[0-9] |^ie[0-9] )" | cut -d" " -f1 | sort -u
+ # dmesg | egrep "(^le[0-9] |^ie[0-9] )" | cut -d" " -f1 | sort -u
+ sed -n -e '1,/^Copyright /d' -e '/^le[0-9]/{s/ .*//;p;q;}'< $MSGBUF
}
md_get_partition_range() {