aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1995-05-25 01:22:20 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1995-05-25 01:22:20 +0000
commit903463ef42563351d2179ff01b733f725e60e50d (patch)
treec5a7d232f1df6fc09acb26c1d560600b61f0b6d1 /usr.sbin/sysinstall
parent34753e5aeee845370ba7c043681dddbe28e48376 (diff)
downloadsrc-903463ef42563351d2179ff01b733f725e60e50d.tar.gz
src-903463ef42563351d2179ff01b733f725e60e50d.zip
Put back some changes that were smashed in yesterday's release tree
shoot-down.
Notes
Notes: svn path=/head/; revision=8739
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/install.c20
-rw-r--r--usr.sbin/sysinstall/label.c4
-rw-r--r--usr.sbin/sysinstall/menus.c4
-rw-r--r--usr.sbin/sysinstall/misc.c35
-rw-r--r--usr.sbin/sysinstall/sysinstall.h3
5 files changed, 49 insertions, 17 deletions
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 7168edd2b3b3..c47e3ed1aecd 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.51 1995/05/24 09:00:28 jkh Exp $
+ * $Id: install.c,v 1.52 1995/05/24 17:49:16 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -117,7 +117,7 @@ checkLabels(void)
return TRUE;
}
-static void
+static Boolean
installInitial(void)
{
extern u_char boot1[], boot2[];
@@ -129,18 +129,18 @@ installInitial(void)
char *cp;
if (alreadyDone)
- return;
+ return TRUE;
if (!getenv(DISK_PARTITIONED)) {
msgConfirm("You need to partition your disk before you can proceed with\nthe installation.");
- return;
+ return FALSE;
}
if (!getenv(DISK_LABELLED)) {
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
- return;
+ return FALSE;
}
if (!checkLabels())
- return;
+ return FALSE;
/* Figure out what kind of MBR the user wants */
dmenuOpenSimple(&MenuMBRType);
@@ -155,7 +155,7 @@ installInitial(void)
/* If we refuse to proceed, bail. */
if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\nIf you're running this on an existing system, we STRONGLY\nencourage you to make proper backups before proceeding.\nWe take no responsibility for lost disk contents!"))
- return;
+ return FALSE;
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
for (i = 0; devs[i]; i++) {
@@ -198,6 +198,7 @@ installInitial(void)
variable_set2(RUNNING_ON_ROOT, "yes");
cpio_extract();
alreadyDone = TRUE;
+ return TRUE;
}
static void
@@ -230,7 +231,8 @@ installCommit(char *str)
if (!mediaVerify())
return 0;
- installInitial();
+ if (!installInitial())
+ return 0;
distExtractAll();
installFinal();
return 0;
@@ -333,7 +335,7 @@ make_filesystems(void)
if (!tmp)
continue;
- command_func_add(tmp->mountpoint, Mount, c1->name);
+ command_func_add(tmp->mountpoint, Mount_DOS, c1->name);
}
}
}
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index 84cd81e0bf93..a2d598b0eec8 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: label.c,v 1.22 1995/05/23 02:41:07 jkh Exp $
+ * $Id: label.c,v 1.23 1995/05/24 09:00:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -473,7 +473,7 @@ diskLabelEditor(char *str)
struct chunk *tmp;
u_long flags = 0;
- val = msgGetInput(NULL, "Please specify the size for new FreeBSD partition in blocks, or append\na trailing `M' for megabytes (e.g. 20M).\nSpace free: %d blocks (%dMB)", sz, sz / ONE_MEG);
+ val = msgGetInput(NULL, "Please specify the size for new FreeBSD partition in blocks, or append\na trailing `M' for megabytes (e.g. 20M).\n\nSpace free: %d blocks (%dMB)", sz, sz / ONE_MEG);
if (!val || (size = strtol(val, &cp, 0)) <= 0)
break;
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 8259e9d47269..7032b0269561 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: menus.c,v 1.27 1995/05/24 09:00:51 jkh Exp $
+ * $Id: menus.c,v 1.28 1995/05/24 17:49:20 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -279,7 +279,7 @@ service provider using a special utility we provide for that purpose.\n\
You can also install over a parallel port using a special \"laplink\"\n\
cable, though this only works if you have another FreeBSD machine running\n\
a fairly recent (2.0R or later) release to talk to.\n\n\
-To use PPP, select one of the serial devices, otherwise select lp0 for\n\
+To use PPP select one of the serial devices, otherwise select lp0 for\n\
the parallel port or one of the ethernet controllers (if you have one)\n\
for an ethernet installation.",
"Press F1 to read network configuration manual",
diff --git a/usr.sbin/sysinstall/misc.c b/usr.sbin/sysinstall/misc.c
index 197a9ec774d4..a2ab20f8aed6 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.7 1995/05/18 16:57:52 jkh Exp $
+ * $Id: misc.c,v 1.8 1995/05/23 18:06:15 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -234,8 +234,37 @@ Mount(char *mountp, void *dev)
msgDebug("mount %s %s\n", device, mountpoint);
ufsargs.fspec = device;
if (mount(MOUNT_UFS, mountpoint, 0, (caddr_t)&ufsargs) == -1) {
- msgConfirm("Error mounting %s on %s : %s\n",
- device, mountpoint, strerror(errno));
+ msgConfirm("Error mounting %s on %s : %s\n", device, mountpoint, strerror(errno));
+ return 1;
+ }
+ return 0;
+}
+
+int
+Mount_DOS(char *mountp, void *dev)
+{
+ struct ufs_args ufsargs;
+ char device[80];
+ char mountpoint[FILENAME_MAX];
+
+ if (*((char *)dev) != '/') {
+ sprintf(device, "/mnt/dev/%s", (char *)dev);
+ sprintf(mountpoint, "/mnt%s", mountp);
+ }
+ else {
+ strcpy(device, dev);
+ strcpy(mountpoint, mountp);
+ }
+ memset(&ufsargs,0,sizeof ufsargs);
+
+ if (Mkdir(mountpoint, NULL)) {
+ msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
+ return 1;
+ }
+ msgDebug("mount %s %s\n", device, mountpoint);
+ ufsargs.fspec = device;
+ if (mount(MOUNT_MSDOS, mountpoint, 0, (caddr_t)&ufsargs) == -1) {
+ msgConfirm("Error mounting %s on %s : %s\n", device, mountpoint, strerror(errno));
return 1;
}
return 0;
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 3c5ac0d3f06c..c7ac0980d7ea 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
- * $Id: sysinstall.h,v 1.30 1995/05/24 09:00:58 jkh Exp $
+ * $Id: sysinstall.h,v 1.31 1995/05/24 22:37:43 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -365,6 +365,7 @@ extern char **item_add_pair(char **list, char *item1, char *item2,
extern void items_free(char **list, int *curr, int *max);
extern int Mkdir(char *, void *data);
extern int Mount(char *, void *data);
+extern int Mount_DOS(char *, void *data);
/* msg.c */
extern void msgInfo(char *fmt, ...);