summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1998-03-16 14:33:18 +0000
committerjkh <jkh@FreeBSD.org>1998-03-16 14:33:18 +0000
commit97f546d2b8c0508c70ab749b9b0ca0f6f69e8f27 (patch)
treeee881d5541857b4c4762e89daf1917b438709766 /release
parent2cd52de11c02a1a68aa5bc4d42b82b5a8ce998de (diff)
downloadFreeBSD-src-97f546d2b8c0508c70ab749b9b0ca0f6f69e8f27.zip
FreeBSD-src-97f546d2b8c0508c70ab749b9b0ca0f6f69e8f27.tar.gz
1. If device node already exists, don't gratuituously try to make it
again. 2. Don't create slice entries when running multi-user; it adds far too much to sysinstall's startup time. User is expected to have correct slice entries after system is installed.
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/devices.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index 5837ba9..fbd5c56 100644
--- a/release/sysinstall/devices.c
+++ b/release/sysinstall/devices.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: devices.c,v 1.70 1998/02/10 18:43:11 jkh Exp $
+ * $Id: devices.c,v 1.71 1998/03/15 16:15:47 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -143,6 +143,9 @@ deviceTry(struct _devname dev, char *try, int i)
snprintf(unit, sizeof unit, dev.name, i);
snprintf(try, FILENAME_MAX, "/dev/%s", unit);
+ fd = open(try, O_RDONLY);
+ if (fd >= 0)
+ return fd;
m = 0640;
if (dev.dev_type == 'c')
m |= S_IFCHR;
@@ -296,7 +299,7 @@ skipif:
case DEVICE_TYPE_DISK:
fd = deviceTry(device_names[i], try, j);
- if (fd >= 0) {
+ if (fd >= 0 && RunningAsInit) {
dev_t d;
int s, fail;
char slice[80];
OpenPOWER on IntegriCloud