summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--release/sysinstall/install.c9
-rw-r--r--release/sysinstall/misc.c17
-rw-r--r--usr.sbin/sade/install.c9
-rw-r--r--usr.sbin/sade/misc.c17
-rw-r--r--usr.sbin/sysinstall/install.c9
-rw-r--r--usr.sbin/sysinstall/misc.c17
6 files changed, 48 insertions, 30 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 77e25729be35..0af815a64d8c 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/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.23 1995/05/18 13:20:53 jkh Exp $
+ * $Id: install.c,v 1.24 1995/05/18 14:11:15 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -173,15 +173,16 @@ make_filesystems(void)
}
else
msgConfirm("Warning: You have selected a Read-Only root device\nand may be unable to find the appropriate device entries on it\nif it is from an older pre-slice version of FreeBSD.");
- if (Mount(dname, NULL)) {
+ if (Mount("/mnt", dname)) {
msgConfirm("Unable to mount the root file system! Giving up.");
return;
}
else {
extern int makedevs(void);
- chdir("/mnt");
- if (makedevs())
+ if (Mkdir("/mnt/dev", NULL)
+ || chdir("/mnt/dev")
+ || makedevs())
msgConfirm("Failed to make some of the devices in /mnt!");
chdir("/");
break;
diff --git a/release/sysinstall/misc.c b/release/sysinstall/misc.c
index 5084c880f503..e8c1ae66246c 100644
--- a/release/sysinstall/misc.c
+++ b/release/sysinstall/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id: misc.c,v 1.4 1995/05/08 21:39:39 jkh Exp $
+ * $Id: misc.c,v 1.5 1995/05/16 11:37:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -206,15 +206,20 @@ Mkdir(char *ipath, void *data)
}
int
-Mount(char *device, void *data)
+Mount(char *mountp, void *dev)
{
struct ufs_args ufsargs;
+ char device[80];
char mountpoint[FILENAME_MAX];
- strcpy(mountpoint, "/mnt");
- if (data)
- sprintf(mountpoint + 4, "/%s", (char *)data);
-
+ if (*((char *)dev) != "/") {
+ sprintf(device, "/mnt/dev/%s", dev);
+ sprintf(mountpoint, "/mnt%s", mountp);
+ }
+ else {
+ strcpy(device, dev);
+ strcpy(mountpoint, mountp);
+ }
memset(&ufsargs,0,sizeof ufsargs);
if (access(mountpoint, R_OK))
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 77e25729be35..0af815a64d8c 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.23 1995/05/18 13:20:53 jkh Exp $
+ * $Id: install.c,v 1.24 1995/05/18 14:11:15 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -173,15 +173,16 @@ make_filesystems(void)
}
else
msgConfirm("Warning: You have selected a Read-Only root device\nand may be unable to find the appropriate device entries on it\nif it is from an older pre-slice version of FreeBSD.");
- if (Mount(dname, NULL)) {
+ if (Mount("/mnt", dname)) {
msgConfirm("Unable to mount the root file system! Giving up.");
return;
}
else {
extern int makedevs(void);
- chdir("/mnt");
- if (makedevs())
+ if (Mkdir("/mnt/dev", NULL)
+ || chdir("/mnt/dev")
+ || makedevs())
msgConfirm("Failed to make some of the devices in /mnt!");
chdir("/");
break;
diff --git a/usr.sbin/sade/misc.c b/usr.sbin/sade/misc.c
index 5084c880f503..e8c1ae66246c 100644
--- a/usr.sbin/sade/misc.c
+++ b/usr.sbin/sade/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id: misc.c,v 1.4 1995/05/08 21:39:39 jkh Exp $
+ * $Id: misc.c,v 1.5 1995/05/16 11:37:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -206,15 +206,20 @@ Mkdir(char *ipath, void *data)
}
int
-Mount(char *device, void *data)
+Mount(char *mountp, void *dev)
{
struct ufs_args ufsargs;
+ char device[80];
char mountpoint[FILENAME_MAX];
- strcpy(mountpoint, "/mnt");
- if (data)
- sprintf(mountpoint + 4, "/%s", (char *)data);
-
+ if (*((char *)dev) != "/") {
+ sprintf(device, "/mnt/dev/%s", dev);
+ sprintf(mountpoint, "/mnt%s", mountp);
+ }
+ else {
+ strcpy(device, dev);
+ strcpy(mountpoint, mountp);
+ }
memset(&ufsargs,0,sizeof ufsargs);
if (access(mountpoint, R_OK))
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 77e25729be35..0af815a64d8c 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/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.23 1995/05/18 13:20:53 jkh Exp $
+ * $Id: install.c,v 1.24 1995/05/18 14:11:15 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -173,15 +173,16 @@ make_filesystems(void)
}
else
msgConfirm("Warning: You have selected a Read-Only root device\nand may be unable to find the appropriate device entries on it\nif it is from an older pre-slice version of FreeBSD.");
- if (Mount(dname, NULL)) {
+ if (Mount("/mnt", dname)) {
msgConfirm("Unable to mount the root file system! Giving up.");
return;
}
else {
extern int makedevs(void);
- chdir("/mnt");
- if (makedevs())
+ if (Mkdir("/mnt/dev", NULL)
+ || chdir("/mnt/dev")
+ || makedevs())
msgConfirm("Failed to make some of the devices in /mnt!");
chdir("/");
break;
diff --git a/usr.sbin/sysinstall/misc.c b/usr.sbin/sysinstall/misc.c
index 5084c880f503..e8c1ae66246c 100644
--- a/usr.sbin/sysinstall/misc.c
+++ b/usr.sbin/sysinstall/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id: misc.c,v 1.4 1995/05/08 21:39:39 jkh Exp $
+ * $Id: misc.c,v 1.5 1995/05/16 11:37:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -206,15 +206,20 @@ Mkdir(char *ipath, void *data)
}
int
-Mount(char *device, void *data)
+Mount(char *mountp, void *dev)
{
struct ufs_args ufsargs;
+ char device[80];
char mountpoint[FILENAME_MAX];
- strcpy(mountpoint, "/mnt");
- if (data)
- sprintf(mountpoint + 4, "/%s", (char *)data);
-
+ if (*((char *)dev) != "/") {
+ sprintf(device, "/mnt/dev/%s", dev);
+ sprintf(mountpoint, "/mnt%s", mountp);
+ }
+ else {
+ strcpy(device, dev);
+ strcpy(mountpoint, mountp);
+ }
memset(&ufsargs,0,sizeof ufsargs);
if (access(mountpoint, R_OK))