aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sade/install.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1996-06-25 18:41:10 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1996-06-25 18:41:10 +0000
commit48800325a6a9e7ba5cce316eeb986b2b0d6e31d3 (patch)
tree9d361e5885fbb3b741137a9470b2e57033518317 /usr.sbin/sade/install.c
parent6a0f4b7e11542628644f9a408cd27d1908078727 (diff)
downloadsrc-48800325a6a9e7ba5cce316eeb986b2b0d6e31d3.tar.gz
src-48800325a6a9e7ba5cce316eeb986b2b0d6e31d3.zip
Make "Fake" turn off more potentially system-nuking options.
Notes
Notes: svn path=/head/; revision=16718
Diffstat (limited to 'usr.sbin/sade/install.c')
-rw-r--r--usr.sbin/sade/install.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 17e2442d89f2..5a7252c4b04a 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.101 1996/06/13 17:36:28 jkh Exp $
+ * $Id: install.c,v 1.102 1996/06/14 14:33:55 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -658,21 +658,21 @@ installFilesystems(dialogMenuItem *self)
/* As the very first thing, try to get ourselves some swap space */
sprintf(dname, "/dev/%s", swapdev->name);
- if (!MakeDevChunk(swapdev, "/dev") || !file_readable(dname)) {
+ if (!Fake && (!MakeDevChunk(swapdev, "/dev") || !file_readable(dname))) {
msgConfirm("Unable to make device node for %s in /dev!\n"
"The creation of filesystems will be aborted.", dname);
return DITEM_FAILURE;
}
- if (!swapon(dname))
+ if (!Fake && !swapon(dname))
msgNotify("Added %s as initial swap device", dname);
- else
+ else if (!Fake)
msgConfirm("WARNING! Unable to swap to %s: %s\n"
"This may cause the installation to fail at some point\n"
"if you don't have a lot of memory.", dname, strerror(errno));
/* Next, create and/or mount the root device */
sprintf(dname, "/dev/r%sa", rootdev->disk->name);
- if (!MakeDevChunk(rootdev, "/dev") || !file_readable(dname)) {
+ if (!Fake && (!MakeDevChunk(rootdev, "/dev") || !file_readable(dname))) {
msgConfirm("Unable to make device node for %s in /dev!\n"
"The creation of filesystems will be aborted.", dname);
return DITEM_FAILURE;
@@ -723,7 +723,8 @@ installFilesystems(dialogMenuItem *self)
}
if (root->newfs || upgrade) {
Mkdir("/mnt/dev", NULL);
- MakeDevDisk(disk, "/mnt/dev");
+ if (!Fake)
+ MakeDevDisk(disk, "/mnt/dev");
}
for (c1 = disk->chunks->part; c1; c1 = c1->next) {
@@ -749,7 +750,7 @@ installFilesystems(dialogMenuItem *self)
if (c2 == swapdev)
continue;
sprintf(fname, "/mnt/dev/%s", c2->name);
- i = swapon(fname);
+ i = (Fake || swapon(fname));
if (!i)
msgNotify("Added %s as an additional swap device", fname);
else