summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-07-14 01:54:39 +0000
committerjkh <jkh@FreeBSD.org>1996-07-14 01:54:39 +0000
commit0a66b4f53af262b5e10fac0f9ba77c6f7bb1ff12 (patch)
tree7b341e6b9a6b332b18507994d0ffcfdbe738aae8 /usr.sbin/sysinstall
parent49cbb2bcfc3ba7cf6685fc91c0bced5bb2ce69e8 (diff)
downloadFreeBSD-src-0a66b4f53af262b5e10fac0f9ba77c6f7bb1ff12.zip
FreeBSD-src-0a66b4f53af262b5e10fac0f9ba77c6f7bb1ff12.tar.gz
Damn - looks like upgrade got broken along the way and it's not something
I usually test, so... :-( Guess we'll have to slide the tag forward on these two files - Peter, could you do the honors? I've been up for the last 30 hours or so and I just *know* that any attempt on my part to do this would probably end up deleting the entire repository somehow. :-)
Diffstat (limited to 'usr.sbin/sysinstall')
-rw-r--r--usr.sbin/sysinstall/installUpgrade.c74
-rw-r--r--usr.sbin/sysinstall/label.c3
2 files changed, 47 insertions, 30 deletions
diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c
index 383a86e..19a7dce 100644
--- a/usr.sbin/sysinstall/installUpgrade.c
+++ b/usr.sbin/sysinstall/installUpgrade.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installUpgrade.c,v 1.28 1996/07/05 08:35:57 jkh Exp $
+ * $Id: installUpgrade.c,v 1.29 1996/07/08 08:54:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -178,12 +178,6 @@ installUpgrade(dialogMenuItem *self)
Boolean extractingBin = TRUE;
struct termios foo;
- if (!RunningAsInit) {
- msgConfirm("You can only perform this procedure when booted off the installation\n"
- "floppy.");
- return DITEM_FAILURE;
- }
-
variable_set2(SYSTEM_STATE, "upgrade");
systemDisplayHelp("upgrade");
@@ -200,6 +194,7 @@ installUpgrade(dialogMenuItem *self)
"system.");
if (!dmenuOpenSimple(&MenuDistributions, FALSE))
return DITEM_FAILURE | DITEM_RECREATE;
+ dialog_clear();
}
/* No bin selected? Not much of an upgrade.. */
@@ -208,7 +203,9 @@ installUpgrade(dialogMenuItem *self)
"This one is pretty vital to a successful 2.1 upgrade. Are you SURE you don't\n"
"want to select the bin distribution? Chose _No_ to bring up the Distributions\n"
"menu.")) {
- (void)dmenuOpenSimple(&MenuDistributions, FALSE);
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE))
+ return DITEM_FAILURE | DITEM_RECREATE;
+ dialog_clear();
}
}
@@ -222,28 +219,49 @@ installUpgrade(dialogMenuItem *self)
return DITEM_FAILURE | DITEM_RECREATE;
}
- msgConfirm("OK. First, we're going to go to the disk label editor. In this editor\n"
- "you will be expected to *Mount* any partitions you're interested in\n"
- "upgrading. DO NOT set the Newfs flag to Y on anything in the label editor\n"
- "unless you're absolutely sure you know what you're doing! In this\n"
- "instance, you'll be using the label editor as little more than a fancy\n"
- "screen-oriented way of labeling existing partitions.\n\n"
- "Once you're done in the label editor, press Q to return here for the next\n"
- "step.");
+ if (RunningAsInit) {
+ Device **devs;
+ int i, cnt;
+ char *cp;
- if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) {
- msgConfirm("The disk label editor failed to work properly! Upgrade operation\n"
- "aborted.");
- return DITEM_FAILURE | DITEM_RECREATE;
- }
+ cp = variable_get(VAR_DISK);
+ devs = deviceFind(cp, DEVICE_TYPE_DISK);
+ cnt = deviceCount(devs);
+ if (!cnt) {
+ msgConfirm("No disks found! Please verify that your disk controller is being\n"
+ "properly probed at boot time. See the Hardware Guide on the\n"
+ "Documentation menu for clues on diagnosing this type of problem.");
+ return DITEM_FAILURE;
+ }
+ else {
+ /* Enable all the drives befor we start */
+ for (i = 0; i < cnt; i++)
+ devs[i]->enabled = TRUE;
+ }
- /* Don't write out MBR info */
- variable_set2(DISK_PARTITIONED, "written");
- if (DITEM_STATUS(diskLabelCommit(self)) == DITEM_FAILURE) {
- msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
- "aborted.");
- variable_unset(DISK_PARTITIONED);
- return DITEM_FAILURE | DITEM_RECREATE;
+ msgConfirm("OK. First, we're going to go to the disk label editor. In this editor\n"
+ "you will be expected to *Mount* any partitions you're interested in\n"
+ "upgrading. DO NOT set the Newfs flag to Y on anything in the label editor\n"
+ "unless you're absolutely sure you know what you're doing! In this\n"
+ "instance, you'll be using the label editor as little more than a fancy\n"
+ "screen-oriented way of labeling existing partitions.\n\n"
+ "Once you're done in the label editor, press Q to return here for the next\n"
+ "step.");
+
+ if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE) {
+ msgConfirm("The disk label editor failed to work properly! Upgrade operation\n"
+ "aborted.");
+ return DITEM_FAILURE | DITEM_RECREATE;
+ }
+
+ /* Don't write out MBR info */
+ variable_set2(DISK_PARTITIONED, "written");
+ if (DITEM_STATUS(diskLabelCommit(self)) == DITEM_FAILURE) {
+ msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
+ "aborted.");
+ variable_unset(DISK_PARTITIONED);
+ return DITEM_FAILURE | DITEM_RECREATE;
+ }
}
if (!copySelf()) {
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index 8235921..ed9c26e 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.51 1996/07/09 03:07:51 jkh Exp $
+ * $Id: label.c,v 1.52 1996/07/12 15:24:49 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -239,7 +239,6 @@ static PartInfo *
new_part(char *mpoint, Boolean newfs, u_long size)
{
PartInfo *ret;
- u_long target, divisor;
if (!mpoint)
mpoint = "/change_me";
OpenPOWER on IntegriCloud