summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-10-20 10:01:26 +0000
committerjkh <jkh@FreeBSD.org>1995-10-20 10:01:26 +0000
commita988dc2f52327559313cbafa94917debf68b5779 (patch)
treef47b7863f0ee10f89e2b6e36512c088fa1b207d8
parent16c38b4771f0586c0f2908c07e22d00e54d7b9ef (diff)
downloadFreeBSD-src-a988dc2f52327559313cbafa94917debf68b5779.zip
FreeBSD-src-a988dc2f52327559313cbafa94917debf68b5779.tar.gz
More bug fixing, make debug settable two ways, put more meat into
the upgrade.
-rw-r--r--release/sysinstall/installUpgrade.c26
-rw-r--r--release/sysinstall/options.c10
-rw-r--r--usr.sbin/sysinstall/installUpgrade.c26
-rw-r--r--usr.sbin/sysinstall/options.c10
4 files changed, 52 insertions, 20 deletions
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c
index 8d56032..bfb63c1 100644
--- a/release/sysinstall/installUpgrade.c
+++ b/release/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.1 1995/10/19 16:15:40 jkh Exp $
+ * $Id: installUpgrade.c,v 1.2 1995/10/19 18:37:46 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -172,6 +172,12 @@ installUpgrade(char *str)
int waitstatus;
pid_t child;
+ if (!RunningAsInit) {
+ msgConfirm("You can only perform this procedure when booted off the installation\n"
+ "floppy.");
+ return RET_FAIL;
+ }
+
if (!Dists) {
msgConfirm("You haven't specified any distributions yet. The upgrade procedure\n"
"will only upgrade those portions of the system for which a distribution\n"
@@ -202,12 +208,15 @@ installUpgrade(char *str)
"risk it all and proceed with this upgrade?"))
return RET_FAIL;
+ /* Note that we're now upgrading */
+ variable_set2(SYSTEM_INSTALLED, "upgrade");
+
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. Don't set the Newfs flag to `Y' on anything in the label\n"
- "editor unless you're absolutely sure you know what you're doing! In\n"
- "this instance, you'll be using the label editor as little more than a\n"
- "fancy screen-oriented filesystem mounting utility!\n\n"
+ "upgrading. Don't 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 filesystem mounting utility, so think of it that way.\n\n"
"Once you're done in the label editor, press Q to return here for the next\n"
"step.\n");
@@ -217,6 +226,8 @@ installUpgrade(char *str)
return RET_FAIL;
}
+ /* Don't write out MBR info */
+ variable_set2(DISK_PARTITIONED, "written");
if (diskLabelCommit(NULL) == RET_FAIL) {
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
"aborted.");
@@ -250,7 +261,7 @@ installUpgrade(char *str)
}
if (file_readable("/kernel")) {
- msgNotify("Moving old kernel to /kernel.205.");
+ msgNotify("Moving old kernel to /kernel.205");
if (system("chflags noschg /mnt/kernel && mv /mnt/kernel /mnt/kernel.205"))
if (!msgYesNo("Hmmm! I couldn't move the old kernel over! Do you want to\n"
"treat this as a big problem and abort the upgrade?"))
@@ -266,7 +277,7 @@ installUpgrade(char *str)
}
msgConfirm("The extraction process seems to have had some problems, but we got most\n"
"of the essentials. We'll treat this as a warning since it may have been\n"
- "a non-essential distribution which failed to load.");
+ "only non-essential distributions which failed to load.");
}
if (extractingBin) {
@@ -318,7 +329,6 @@ installUpgrade(char *str)
DialogActive = FALSE;
if (!(child = fork())) {
- int i, fd;
struct termios foo;
signal(SIGTTOU, SIG_IGN);
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index 24083e8..808b9a9 100644
--- a/release/sysinstall/options.c
+++ b/release/sysinstall/options.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: options.c,v 1.15 1995/10/19 18:37:49 jkh Exp $
+ * $Id: options.c,v 1.16 1995/10/20 07:02:46 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -71,6 +71,12 @@ resetLogo(char *str)
}
static char *
+debugCheck(char *str)
+{
+ return isDebug() ? "ON" : "OFF";
+}
+
+static char *
mediaCheck(Option opt)
{
if (mediaDevice) {
@@ -113,7 +119,7 @@ static Option Options[] = {
{ "NFS Slow", "User is using a slow PC or ethernet card",
OPT_IS_FLAG, &OptFlags, (void *)OPT_SLOW_ETHER, NULL },
{ "Debugging", "Emit extra debugging output on VTY2 (ALT-F2)",
- OPT_IS_FLAG, &OptFlags, (void *)OPT_DEBUG, NULL },
+ OPT_IS_FLAG, &OptFlags, (void *)OPT_DEBUG, debugCheck },
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
OPT_IS_FLAG, &OptFlags, (void *)OPT_NO_CONFIRM, NULL },
{ "FTP Abort", "On transfer failure, abort the installation of a distribution",
diff --git a/usr.sbin/sysinstall/installUpgrade.c b/usr.sbin/sysinstall/installUpgrade.c
index 8d56032..bfb63c1 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.1 1995/10/19 16:15:40 jkh Exp $
+ * $Id: installUpgrade.c,v 1.2 1995/10/19 18:37:46 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -172,6 +172,12 @@ installUpgrade(char *str)
int waitstatus;
pid_t child;
+ if (!RunningAsInit) {
+ msgConfirm("You can only perform this procedure when booted off the installation\n"
+ "floppy.");
+ return RET_FAIL;
+ }
+
if (!Dists) {
msgConfirm("You haven't specified any distributions yet. The upgrade procedure\n"
"will only upgrade those portions of the system for which a distribution\n"
@@ -202,12 +208,15 @@ installUpgrade(char *str)
"risk it all and proceed with this upgrade?"))
return RET_FAIL;
+ /* Note that we're now upgrading */
+ variable_set2(SYSTEM_INSTALLED, "upgrade");
+
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. Don't set the Newfs flag to `Y' on anything in the label\n"
- "editor unless you're absolutely sure you know what you're doing! In\n"
- "this instance, you'll be using the label editor as little more than a\n"
- "fancy screen-oriented filesystem mounting utility!\n\n"
+ "upgrading. Don't 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 filesystem mounting utility, so think of it that way.\n\n"
"Once you're done in the label editor, press Q to return here for the next\n"
"step.\n");
@@ -217,6 +226,8 @@ installUpgrade(char *str)
return RET_FAIL;
}
+ /* Don't write out MBR info */
+ variable_set2(DISK_PARTITIONED, "written");
if (diskLabelCommit(NULL) == RET_FAIL) {
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
"aborted.");
@@ -250,7 +261,7 @@ installUpgrade(char *str)
}
if (file_readable("/kernel")) {
- msgNotify("Moving old kernel to /kernel.205.");
+ msgNotify("Moving old kernel to /kernel.205");
if (system("chflags noschg /mnt/kernel && mv /mnt/kernel /mnt/kernel.205"))
if (!msgYesNo("Hmmm! I couldn't move the old kernel over! Do you want to\n"
"treat this as a big problem and abort the upgrade?"))
@@ -266,7 +277,7 @@ installUpgrade(char *str)
}
msgConfirm("The extraction process seems to have had some problems, but we got most\n"
"of the essentials. We'll treat this as a warning since it may have been\n"
- "a non-essential distribution which failed to load.");
+ "only non-essential distributions which failed to load.");
}
if (extractingBin) {
@@ -318,7 +329,6 @@ installUpgrade(char *str)
DialogActive = FALSE;
if (!(child = fork())) {
- int i, fd;
struct termios foo;
signal(SIGTTOU, SIG_IGN);
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c
index 24083e8..808b9a9 100644
--- a/usr.sbin/sysinstall/options.c
+++ b/usr.sbin/sysinstall/options.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: options.c,v 1.15 1995/10/19 18:37:49 jkh Exp $
+ * $Id: options.c,v 1.16 1995/10/20 07:02:46 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -71,6 +71,12 @@ resetLogo(char *str)
}
static char *
+debugCheck(char *str)
+{
+ return isDebug() ? "ON" : "OFF";
+}
+
+static char *
mediaCheck(Option opt)
{
if (mediaDevice) {
@@ -113,7 +119,7 @@ static Option Options[] = {
{ "NFS Slow", "User is using a slow PC or ethernet card",
OPT_IS_FLAG, &OptFlags, (void *)OPT_SLOW_ETHER, NULL },
{ "Debugging", "Emit extra debugging output on VTY2 (ALT-F2)",
- OPT_IS_FLAG, &OptFlags, (void *)OPT_DEBUG, NULL },
+ OPT_IS_FLAG, &OptFlags, (void *)OPT_DEBUG, debugCheck },
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
OPT_IS_FLAG, &OptFlags, (void *)OPT_NO_CONFIRM, NULL },
{ "FTP Abort", "On transfer failure, abort the installation of a distribution",
OpenPOWER on IntegriCloud