summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release/sysinstall/disks.c22
-rw-r--r--release/sysinstall/help/slice.hlp32
-rw-r--r--release/sysinstall/install.c63
-rw-r--r--release/sysinstall/label.c2
-rw-r--r--release/sysinstall/options.c8
-rw-r--r--release/sysinstall/sysinstall.h2
-rw-r--r--usr.sbin/sade/disks.c22
-rw-r--r--usr.sbin/sade/help/slice.hlp32
-rw-r--r--usr.sbin/sade/install.c63
-rw-r--r--usr.sbin/sade/label.c2
-rw-r--r--usr.sbin/sade/sade.h2
-rw-r--r--usr.sbin/sysinstall/disks.c22
-rw-r--r--usr.sbin/sysinstall/help/slice.hlp32
-rw-r--r--usr.sbin/sysinstall/install.c63
-rw-r--r--usr.sbin/sysinstall/label.c2
-rw-r--r--usr.sbin/sysinstall/options.c8
-rw-r--r--usr.sbin/sysinstall/sysinstall.h2
17 files changed, 257 insertions, 122 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index d315468..44deb3e 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -117,11 +117,11 @@ static void
print_command_summary()
{
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
- mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
- mvprintw(17, 0, "D = Delete Partition G = Set Drive Geometry S = Set Bootable");
+ mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Slice");
+ mvprintw(17, 0, "D = Delete Slice G = Set Drive Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes Q = Finish");
if (!RunningAsInit)
- mvprintw(18, 46, "W = Write Changes");
+ mvprintw(18, 48, "W = Write Changes");
mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select.");
move(0, 0);
}
@@ -270,7 +270,7 @@ diskPartition(Device *dev, Disk *d)
case 'B':
if (chunk_info[current_chunk]->type != freebsd)
- msg = "Can only scan for bad blocks in FreeBSD partition.";
+ msg = "Can only scan for bad blocks in FreeBSD slice.";
else if (strncmp(d->name, "sd", 2) ||
!msgYesNo("This typically makes sense only for ESDI, IDE or MFM drives.\n"
"Are you sure you want to do this on a SCSI disk?")) {
@@ -284,14 +284,14 @@ diskPartition(Device *dev, Disk *d)
case 'C':
if (chunk_info[current_chunk]->type != unused)
- msg = "Partition in use, delete it first or move to an unused one.";
+ msg = "Slice in use, delete it first or move to an unused one.";
else {
char *val, tmp[20], *cp;
int size, subtype;
chunk_e partitiontype;
snprintf(tmp, 20, "%d", chunk_info[current_chunk]->size);
- val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks\n"
+ val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n"
"or append a trailing `M' for megabytes (e.g. 20M).");
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
@@ -299,7 +299,7 @@ diskPartition(Device *dev, Disk *d)
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
- "partition (type 165). You can choose other types, 6 for a\n"
+ "slice (type 165). You can choose other types, 6 for a\n"
"DOS partition or 131 for a Linux partition, for example.\n\n"
"Note: If you choose a non-FreeBSD partition type, it will not\n"
"be formatted or otherwise prepared, it will simply reserve space\n"
@@ -325,7 +325,7 @@ diskPartition(Device *dev, Disk *d)
case KEY_DC:
case 'D':
if (chunk_info[current_chunk]->type == unused)
- msg = "Partition is already unused!";
+ msg = "Slice is already unused!";
else {
Delete_Chunk(d, chunk_info[current_chunk]);
variable_set2(DISK_PARTITIONED, "yes");
@@ -440,9 +440,9 @@ diskPartition(Device *dev, Disk *d)
char buf[FILENAME_MAX];
dialog_clear_norefresh();
- use_helpline("Press F1 to read more about disk partitioning.");
+ use_helpline("Press F1 to read more about disk slices.");
use_helpfile(systemHelpFile("partition", buf));
- dialog_mesgbox("Disk partitioning warning:", p, -1, -1);
+ dialog_mesgbox("Disk slicing warning:", p, -1, -1);
free(p);
}
restorescr(w);
@@ -560,7 +560,7 @@ diskPartitionWrite(dialogMenuItem *self)
if (c1->flags & CHUNK_BAD144) {
int ret;
- msgNotify("Running bad block scan on partition %s", c1->name);
+ msgNotify("Running bad block scan on slice %s", c1->name);
if (!Fake) {
ret = vsystem("bad144 -v /dev/r%s 1234", c1->name);
if (ret)
diff --git a/release/sysinstall/help/slice.hlp b/release/sysinstall/help/slice.hlp
index 135a765..22ca1e6 100644
--- a/release/sysinstall/help/slice.hlp
+++ b/release/sysinstall/help/slice.hlp
@@ -1,15 +1,15 @@
-This is the Main Partition (or ``FDISK'') Editor.
+This is the Main Slice (or ``FDISK'' Partition) Editor.
Possible commands are printed at the bottom and the Master Boot Record
contents are shown at the top. You can move up and down with the
-arrow keys and (C)reate a new partition whenever the highlighted
-selection bar is over a partition whose type is marked as "unused."
+arrow keys and (C)reate a new slice whenever the highlighted
+selection bar is over a slice whose type is marked as "unused."
-You are expected to leave this screen with at least one partition
+You are expected to leave this screen with at least one slice
marked "FreeBSD." Note that unlike Linux, you don't need to create
-multiple FreeBSD fdisk partition entries for different things like
+multiple FreeBSD fdisk slice entries for different things like
swap, file systems, etc. The usual convention is to create ONE
-FreeBSD partition per drive and then subsection this partition into
+FreeBSD slice per drive and then subsection this slice into
swap and file systems with the Label editor.
No actual changes will be made to the disk until you (C)ommit from the
@@ -28,7 +28,7 @@ For the truly dedicated disk case, you can select `No' at the
compatibility prompt. In that case, all BIOS geometry considerations
will no longer be in effect and you can safely ignore any
``The detected geometry is invalid'' warning messages you may later
-see. It is also not necessary in this case to set a partition bootable
+see. It is also not necessary in this case to set a slice bootable
or install an MBR boot manager as both things are then irrelevant.
The FreeBSD slice will start at absolute sector 0 of the disk (so that
@@ -42,18 +42,18 @@ FreeBSD server or workstation, not a typical `home PC'.
The flags field has the following legend:
- '=' -- This partition is properly aligned.
- '>' -- This partition doesn't end before cylinder 1024
- 'R' -- This partition contains the root (/) filesystem
- 'B' -- Partition employs BAD144 bad-spot handling
- 'C' -- This is the FreeBSD 2.0-compatibility partition (default)
- 'A' -- This partition is marked active.
+ '=' -- This slice is properly aligned.
+ '>' -- This slice doesn't end before cylinder 1024
+ 'R' -- This slice contains the root (/) filesystem
+ 'B' -- Slice employs BAD144 bad-spot handling
+ 'C' -- This is the FreeBSD 2.0-compatibility slice (default)
+ 'A' -- This slice is marked active.
-If you select a partition for Bad144 handling, it will be scanned
+If you select a slice for Bad144 handling, it will be scanned
for bad blocks before any new filesystems are made on it.
-If no partition is marked Active, you will need to either install
+If no slice is marked Active, you will need to either install
a Boot Manager (the option for which will be presented later in the
installation) or set one Active before leaving this screen.
-To leave the partition editor, type `Q'.
+To leave the slice editor, type `Q'.
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 682d814..c42b084 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -230,8 +230,6 @@ installInitial(void)
msgConfirm("Unable to chroot to /mnt - this is bad!");
return DITEM_FAILURE;
}
- else
- Chrooted = TRUE;
chdir("/");
variable_set2(RUNNING_ON_ROOT, "yes");
@@ -443,6 +441,21 @@ installExpress(dialogMenuItem *self)
if (DITEM_STATUS((i = diskLabelEditor(self))) == DITEM_FAILURE)
return i;
+ if (!Dists) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice->init(mediaDevice))
+ return DITEM_FAILURE | DITEM_REDRAW;
+
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
i |= DITEM_LEAVE_MENU;
/* Give user the option of one last configuration spree */
@@ -482,6 +495,24 @@ installNovice(dialogMenuItem *self)
if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE)
return DITEM_FAILURE;
+ while (1) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
+ if (Dists)
+ break;
+
+ if (msgYesNo("No distributions selected. Revisit the distributions menu?"))
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
+ if (!mediaDevice->init(mediaDevice))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
dialog_clear_norefresh();
msgConfirm("Installation completed with some errors. You may wish to\n"
@@ -638,29 +669,43 @@ int
installCommit(dialogMenuItem *self)
{
int i;
+ char *str;
Boolean need_bin;
if (!Dists) {
- if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
+ if (!msgYesNo("No distributions are selected for installation! Do you\n"
+ "want to do this now?")) {
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+ else
return DITEM_FAILURE | DITEM_RESTORE;
}
-media:
if (!mediaDevice) {
- if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
- return DITEM_FAILURE | DITEM_RESTORE;
+ if (!msgYesNo("You need to select a media type first. Do you want\n"
+ "to do this now?")) {
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+ else
+ return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Unable to initialize selected media. Would you like to\n"
- "adjust your media configuration and try again?")) {
- mediaDevice = NULL;
- goto media;
+ "adjust your media configuration?")) {
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
}
else
return DITEM_FAILURE | DITEM_RESTORE;
}
+ str = variable_get(SYSTEM_STATE);
+ if (isDebug())
+ msgDebug("installCommit: System state is `%s'\n", str);
+
if (RunningAsInit) {
/* Do things we wouldn't do to a multi-user system */
if (DITEM_STATUS((i = installInitial())) == DITEM_FAILURE)
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index 30bf9d5..063f4f6 100644
--- a/release/sysinstall/label.c
+++ b/release/sysinstall/label.c
@@ -460,7 +460,7 @@ static void
print_command_summary(void)
{
mvprintw(17, 0, "The following commands are valid here (upper or lower case):");
- mvprintw(18, 0, "C = Create D = Delete M = Mount");
+ mvprintw(18, 0, "C = Create D = Delete M = Mount pt.");
if (!RunningAsInit)
mvprintw(18, 47, "W = Write");
mvprintw(19, 0, "N = Newfs Opts T = Newfs Toggle U = Undo Q = Finish");
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index 33d461a..284bc0e 100644
--- a/release/sysinstall/options.c
+++ b/release/sysinstall/options.c
@@ -127,16 +127,16 @@ static Option Options[] = {
OPT_IS_VAR, RELNAME_PROMPT, VAR_RELNAME, varCheck },
{ "Install Root", "Which directory to unpack distributions or packages relative to",
OPT_IS_VAR, INSTROOT_PROMPT, VAR_INSTALL_ROOT, varCheck },
+{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
+ OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
+{ "Browser Exec", "This is the path to the main binary of the browser package",
+ OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
{ "Media Type", "The current installation media type.",
OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck },
{ "Media Timeout", "Timeout value in seconds for slow media.",
OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
-{ "Browser Exec", "This is the path to the main binary of the browser package",
- OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
-{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
- OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
{ "Apache package", "The name of the Apache package to install if requested",
OPT_IS_VAR, APACHE_PKG_PROMPT, VAR_APACHE_PKG, varCheck },
{ "Samba package", "The name of the Samba package to install if requested",
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 3de34c9..59a81a8 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -313,7 +313,7 @@ extern int DebugFD; /* Where diagnostic output goes */
extern Boolean Fake; /* Don't actually modify anything - testing */
extern Boolean SystemWasInstalled; /* Did we install it? */
extern Boolean RunningAsInit; /* Are we running stand-alone? */
-extern Boolean Chrooted; /* Yow, are we chrooted yet? */
+extern Boolean Chrooted; /* Are we chroot()ed? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Boolean ColorDisplay; /* Are we on a color display? */
extern Boolean OnVTY; /* On a syscons VTY? */
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index d315468..44deb3e 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -117,11 +117,11 @@ static void
print_command_summary()
{
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
- mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
- mvprintw(17, 0, "D = Delete Partition G = Set Drive Geometry S = Set Bootable");
+ mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Slice");
+ mvprintw(17, 0, "D = Delete Slice G = Set Drive Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes Q = Finish");
if (!RunningAsInit)
- mvprintw(18, 46, "W = Write Changes");
+ mvprintw(18, 48, "W = Write Changes");
mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select.");
move(0, 0);
}
@@ -270,7 +270,7 @@ diskPartition(Device *dev, Disk *d)
case 'B':
if (chunk_info[current_chunk]->type != freebsd)
- msg = "Can only scan for bad blocks in FreeBSD partition.";
+ msg = "Can only scan for bad blocks in FreeBSD slice.";
else if (strncmp(d->name, "sd", 2) ||
!msgYesNo("This typically makes sense only for ESDI, IDE or MFM drives.\n"
"Are you sure you want to do this on a SCSI disk?")) {
@@ -284,14 +284,14 @@ diskPartition(Device *dev, Disk *d)
case 'C':
if (chunk_info[current_chunk]->type != unused)
- msg = "Partition in use, delete it first or move to an unused one.";
+ msg = "Slice in use, delete it first or move to an unused one.";
else {
char *val, tmp[20], *cp;
int size, subtype;
chunk_e partitiontype;
snprintf(tmp, 20, "%d", chunk_info[current_chunk]->size);
- val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks\n"
+ val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n"
"or append a trailing `M' for megabytes (e.g. 20M).");
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
@@ -299,7 +299,7 @@ diskPartition(Device *dev, Disk *d)
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
- "partition (type 165). You can choose other types, 6 for a\n"
+ "slice (type 165). You can choose other types, 6 for a\n"
"DOS partition or 131 for a Linux partition, for example.\n\n"
"Note: If you choose a non-FreeBSD partition type, it will not\n"
"be formatted or otherwise prepared, it will simply reserve space\n"
@@ -325,7 +325,7 @@ diskPartition(Device *dev, Disk *d)
case KEY_DC:
case 'D':
if (chunk_info[current_chunk]->type == unused)
- msg = "Partition is already unused!";
+ msg = "Slice is already unused!";
else {
Delete_Chunk(d, chunk_info[current_chunk]);
variable_set2(DISK_PARTITIONED, "yes");
@@ -440,9 +440,9 @@ diskPartition(Device *dev, Disk *d)
char buf[FILENAME_MAX];
dialog_clear_norefresh();
- use_helpline("Press F1 to read more about disk partitioning.");
+ use_helpline("Press F1 to read more about disk slices.");
use_helpfile(systemHelpFile("partition", buf));
- dialog_mesgbox("Disk partitioning warning:", p, -1, -1);
+ dialog_mesgbox("Disk slicing warning:", p, -1, -1);
free(p);
}
restorescr(w);
@@ -560,7 +560,7 @@ diskPartitionWrite(dialogMenuItem *self)
if (c1->flags & CHUNK_BAD144) {
int ret;
- msgNotify("Running bad block scan on partition %s", c1->name);
+ msgNotify("Running bad block scan on slice %s", c1->name);
if (!Fake) {
ret = vsystem("bad144 -v /dev/r%s 1234", c1->name);
if (ret)
diff --git a/usr.sbin/sade/help/slice.hlp b/usr.sbin/sade/help/slice.hlp
index 135a765..22ca1e6 100644
--- a/usr.sbin/sade/help/slice.hlp
+++ b/usr.sbin/sade/help/slice.hlp
@@ -1,15 +1,15 @@
-This is the Main Partition (or ``FDISK'') Editor.
+This is the Main Slice (or ``FDISK'' Partition) Editor.
Possible commands are printed at the bottom and the Master Boot Record
contents are shown at the top. You can move up and down with the
-arrow keys and (C)reate a new partition whenever the highlighted
-selection bar is over a partition whose type is marked as "unused."
+arrow keys and (C)reate a new slice whenever the highlighted
+selection bar is over a slice whose type is marked as "unused."
-You are expected to leave this screen with at least one partition
+You are expected to leave this screen with at least one slice
marked "FreeBSD." Note that unlike Linux, you don't need to create
-multiple FreeBSD fdisk partition entries for different things like
+multiple FreeBSD fdisk slice entries for different things like
swap, file systems, etc. The usual convention is to create ONE
-FreeBSD partition per drive and then subsection this partition into
+FreeBSD slice per drive and then subsection this slice into
swap and file systems with the Label editor.
No actual changes will be made to the disk until you (C)ommit from the
@@ -28,7 +28,7 @@ For the truly dedicated disk case, you can select `No' at the
compatibility prompt. In that case, all BIOS geometry considerations
will no longer be in effect and you can safely ignore any
``The detected geometry is invalid'' warning messages you may later
-see. It is also not necessary in this case to set a partition bootable
+see. It is also not necessary in this case to set a slice bootable
or install an MBR boot manager as both things are then irrelevant.
The FreeBSD slice will start at absolute sector 0 of the disk (so that
@@ -42,18 +42,18 @@ FreeBSD server or workstation, not a typical `home PC'.
The flags field has the following legend:
- '=' -- This partition is properly aligned.
- '>' -- This partition doesn't end before cylinder 1024
- 'R' -- This partition contains the root (/) filesystem
- 'B' -- Partition employs BAD144 bad-spot handling
- 'C' -- This is the FreeBSD 2.0-compatibility partition (default)
- 'A' -- This partition is marked active.
+ '=' -- This slice is properly aligned.
+ '>' -- This slice doesn't end before cylinder 1024
+ 'R' -- This slice contains the root (/) filesystem
+ 'B' -- Slice employs BAD144 bad-spot handling
+ 'C' -- This is the FreeBSD 2.0-compatibility slice (default)
+ 'A' -- This slice is marked active.
-If you select a partition for Bad144 handling, it will be scanned
+If you select a slice for Bad144 handling, it will be scanned
for bad blocks before any new filesystems are made on it.
-If no partition is marked Active, you will need to either install
+If no slice is marked Active, you will need to either install
a Boot Manager (the option for which will be presented later in the
installation) or set one Active before leaving this screen.
-To leave the partition editor, type `Q'.
+To leave the slice editor, type `Q'.
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 682d814..c42b084 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -230,8 +230,6 @@ installInitial(void)
msgConfirm("Unable to chroot to /mnt - this is bad!");
return DITEM_FAILURE;
}
- else
- Chrooted = TRUE;
chdir("/");
variable_set2(RUNNING_ON_ROOT, "yes");
@@ -443,6 +441,21 @@ installExpress(dialogMenuItem *self)
if (DITEM_STATUS((i = diskLabelEditor(self))) == DITEM_FAILURE)
return i;
+ if (!Dists) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice->init(mediaDevice))
+ return DITEM_FAILURE | DITEM_REDRAW;
+
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
i |= DITEM_LEAVE_MENU;
/* Give user the option of one last configuration spree */
@@ -482,6 +495,24 @@ installNovice(dialogMenuItem *self)
if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE)
return DITEM_FAILURE;
+ while (1) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
+ if (Dists)
+ break;
+
+ if (msgYesNo("No distributions selected. Revisit the distributions menu?"))
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
+ if (!mediaDevice->init(mediaDevice))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
dialog_clear_norefresh();
msgConfirm("Installation completed with some errors. You may wish to\n"
@@ -638,29 +669,43 @@ int
installCommit(dialogMenuItem *self)
{
int i;
+ char *str;
Boolean need_bin;
if (!Dists) {
- if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
+ if (!msgYesNo("No distributions are selected for installation! Do you\n"
+ "want to do this now?")) {
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+ else
return DITEM_FAILURE | DITEM_RESTORE;
}
-media:
if (!mediaDevice) {
- if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
- return DITEM_FAILURE | DITEM_RESTORE;
+ if (!msgYesNo("You need to select a media type first. Do you want\n"
+ "to do this now?")) {
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+ else
+ return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Unable to initialize selected media. Would you like to\n"
- "adjust your media configuration and try again?")) {
- mediaDevice = NULL;
- goto media;
+ "adjust your media configuration?")) {
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
}
else
return DITEM_FAILURE | DITEM_RESTORE;
}
+ str = variable_get(SYSTEM_STATE);
+ if (isDebug())
+ msgDebug("installCommit: System state is `%s'\n", str);
+
if (RunningAsInit) {
/* Do things we wouldn't do to a multi-user system */
if (DITEM_STATUS((i = installInitial())) == DITEM_FAILURE)
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index 30bf9d5..063f4f6 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -460,7 +460,7 @@ static void
print_command_summary(void)
{
mvprintw(17, 0, "The following commands are valid here (upper or lower case):");
- mvprintw(18, 0, "C = Create D = Delete M = Mount");
+ mvprintw(18, 0, "C = Create D = Delete M = Mount pt.");
if (!RunningAsInit)
mvprintw(18, 47, "W = Write");
mvprintw(19, 0, "N = Newfs Opts T = Newfs Toggle U = Undo Q = Finish");
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 3de34c9..59a81a8 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -313,7 +313,7 @@ extern int DebugFD; /* Where diagnostic output goes */
extern Boolean Fake; /* Don't actually modify anything - testing */
extern Boolean SystemWasInstalled; /* Did we install it? */
extern Boolean RunningAsInit; /* Are we running stand-alone? */
-extern Boolean Chrooted; /* Yow, are we chrooted yet? */
+extern Boolean Chrooted; /* Are we chroot()ed? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Boolean ColorDisplay; /* Are we on a color display? */
extern Boolean OnVTY; /* On a syscons VTY? */
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index d315468..44deb3e 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -117,11 +117,11 @@ static void
print_command_summary()
{
mvprintw(14, 0, "The following commands are supported (in upper or lower case):");
- mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Partition");
- mvprintw(17, 0, "D = Delete Partition G = Set Drive Geometry S = Set Bootable");
+ mvprintw(16, 0, "A = Use Entire Disk B = Bad Block Scan C = Create Slice");
+ mvprintw(17, 0, "D = Delete Slice G = Set Drive Geometry S = Set Bootable");
mvprintw(18, 0, "U = Undo All Changes Q = Finish");
if (!RunningAsInit)
- mvprintw(18, 46, "W = Write Changes");
+ mvprintw(18, 48, "W = Write Changes");
mvprintw(21, 0, "Use F1 or ? to get more help, arrow keys to select.");
move(0, 0);
}
@@ -270,7 +270,7 @@ diskPartition(Device *dev, Disk *d)
case 'B':
if (chunk_info[current_chunk]->type != freebsd)
- msg = "Can only scan for bad blocks in FreeBSD partition.";
+ msg = "Can only scan for bad blocks in FreeBSD slice.";
else if (strncmp(d->name, "sd", 2) ||
!msgYesNo("This typically makes sense only for ESDI, IDE or MFM drives.\n"
"Are you sure you want to do this on a SCSI disk?")) {
@@ -284,14 +284,14 @@ diskPartition(Device *dev, Disk *d)
case 'C':
if (chunk_info[current_chunk]->type != unused)
- msg = "Partition in use, delete it first or move to an unused one.";
+ msg = "Slice in use, delete it first or move to an unused one.";
else {
char *val, tmp[20], *cp;
int size, subtype;
chunk_e partitiontype;
snprintf(tmp, 20, "%d", chunk_info[current_chunk]->size);
- val = msgGetInput(tmp, "Please specify the size for new FreeBSD partition in blocks\n"
+ val = msgGetInput(tmp, "Please specify the size for new FreeBSD slice in blocks\n"
"or append a trailing `M' for megabytes (e.g. 20M).");
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
@@ -299,7 +299,7 @@ diskPartition(Device *dev, Disk *d)
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
- "partition (type 165). You can choose other types, 6 for a\n"
+ "slice (type 165). You can choose other types, 6 for a\n"
"DOS partition or 131 for a Linux partition, for example.\n\n"
"Note: If you choose a non-FreeBSD partition type, it will not\n"
"be formatted or otherwise prepared, it will simply reserve space\n"
@@ -325,7 +325,7 @@ diskPartition(Device *dev, Disk *d)
case KEY_DC:
case 'D':
if (chunk_info[current_chunk]->type == unused)
- msg = "Partition is already unused!";
+ msg = "Slice is already unused!";
else {
Delete_Chunk(d, chunk_info[current_chunk]);
variable_set2(DISK_PARTITIONED, "yes");
@@ -440,9 +440,9 @@ diskPartition(Device *dev, Disk *d)
char buf[FILENAME_MAX];
dialog_clear_norefresh();
- use_helpline("Press F1 to read more about disk partitioning.");
+ use_helpline("Press F1 to read more about disk slices.");
use_helpfile(systemHelpFile("partition", buf));
- dialog_mesgbox("Disk partitioning warning:", p, -1, -1);
+ dialog_mesgbox("Disk slicing warning:", p, -1, -1);
free(p);
}
restorescr(w);
@@ -560,7 +560,7 @@ diskPartitionWrite(dialogMenuItem *self)
if (c1->flags & CHUNK_BAD144) {
int ret;
- msgNotify("Running bad block scan on partition %s", c1->name);
+ msgNotify("Running bad block scan on slice %s", c1->name);
if (!Fake) {
ret = vsystem("bad144 -v /dev/r%s 1234", c1->name);
if (ret)
diff --git a/usr.sbin/sysinstall/help/slice.hlp b/usr.sbin/sysinstall/help/slice.hlp
index 135a765..22ca1e6 100644
--- a/usr.sbin/sysinstall/help/slice.hlp
+++ b/usr.sbin/sysinstall/help/slice.hlp
@@ -1,15 +1,15 @@
-This is the Main Partition (or ``FDISK'') Editor.
+This is the Main Slice (or ``FDISK'' Partition) Editor.
Possible commands are printed at the bottom and the Master Boot Record
contents are shown at the top. You can move up and down with the
-arrow keys and (C)reate a new partition whenever the highlighted
-selection bar is over a partition whose type is marked as "unused."
+arrow keys and (C)reate a new slice whenever the highlighted
+selection bar is over a slice whose type is marked as "unused."
-You are expected to leave this screen with at least one partition
+You are expected to leave this screen with at least one slice
marked "FreeBSD." Note that unlike Linux, you don't need to create
-multiple FreeBSD fdisk partition entries for different things like
+multiple FreeBSD fdisk slice entries for different things like
swap, file systems, etc. The usual convention is to create ONE
-FreeBSD partition per drive and then subsection this partition into
+FreeBSD slice per drive and then subsection this slice into
swap and file systems with the Label editor.
No actual changes will be made to the disk until you (C)ommit from the
@@ -28,7 +28,7 @@ For the truly dedicated disk case, you can select `No' at the
compatibility prompt. In that case, all BIOS geometry considerations
will no longer be in effect and you can safely ignore any
``The detected geometry is invalid'' warning messages you may later
-see. It is also not necessary in this case to set a partition bootable
+see. It is also not necessary in this case to set a slice bootable
or install an MBR boot manager as both things are then irrelevant.
The FreeBSD slice will start at absolute sector 0 of the disk (so that
@@ -42,18 +42,18 @@ FreeBSD server or workstation, not a typical `home PC'.
The flags field has the following legend:
- '=' -- This partition is properly aligned.
- '>' -- This partition doesn't end before cylinder 1024
- 'R' -- This partition contains the root (/) filesystem
- 'B' -- Partition employs BAD144 bad-spot handling
- 'C' -- This is the FreeBSD 2.0-compatibility partition (default)
- 'A' -- This partition is marked active.
+ '=' -- This slice is properly aligned.
+ '>' -- This slice doesn't end before cylinder 1024
+ 'R' -- This slice contains the root (/) filesystem
+ 'B' -- Slice employs BAD144 bad-spot handling
+ 'C' -- This is the FreeBSD 2.0-compatibility slice (default)
+ 'A' -- This slice is marked active.
-If you select a partition for Bad144 handling, it will be scanned
+If you select a slice for Bad144 handling, it will be scanned
for bad blocks before any new filesystems are made on it.
-If no partition is marked Active, you will need to either install
+If no slice is marked Active, you will need to either install
a Boot Manager (the option for which will be presented later in the
installation) or set one Active before leaving this screen.
-To leave the partition editor, type `Q'.
+To leave the slice editor, type `Q'.
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 682d814..c42b084 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -230,8 +230,6 @@ installInitial(void)
msgConfirm("Unable to chroot to /mnt - this is bad!");
return DITEM_FAILURE;
}
- else
- Chrooted = TRUE;
chdir("/");
variable_set2(RUNNING_ON_ROOT, "yes");
@@ -443,6 +441,21 @@ installExpress(dialogMenuItem *self)
if (DITEM_STATUS((i = diskLabelEditor(self))) == DITEM_FAILURE)
return i;
+ if (!Dists) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) || !Dists)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice->init(mediaDevice))
+ return DITEM_FAILURE | DITEM_REDRAW;
+
if (DITEM_STATUS((i = installCommit(self))) == DITEM_SUCCESS) {
i |= DITEM_LEAVE_MENU;
/* Give user the option of one last configuration spree */
@@ -482,6 +495,24 @@ installNovice(dialogMenuItem *self)
if (DITEM_STATUS(diskLabelEditor(self)) == DITEM_FAILURE)
return DITEM_FAILURE;
+ while (1) {
+ dialog_clear_norefresh();
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
+ if (Dists)
+ break;
+
+ if (msgYesNo("No distributions selected. Revisit the distributions menu?"))
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+
+ if (!mediaDevice && (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
+ if (!mediaDevice->init(mediaDevice))
+ return DITEM_FAILURE | DITEM_RESTORE;
+
if (DITEM_STATUS((i = installCommit(self))) == DITEM_FAILURE) {
dialog_clear_norefresh();
msgConfirm("Installation completed with some errors. You may wish to\n"
@@ -638,29 +669,43 @@ int
installCommit(dialogMenuItem *self)
{
int i;
+ char *str;
Boolean need_bin;
if (!Dists) {
- if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
+ if (!msgYesNo("No distributions are selected for installation! Do you\n"
+ "want to do this now?")) {
+ if (!dmenuOpenSimple(&MenuDistributions, FALSE) && !Dists)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+ else
return DITEM_FAILURE | DITEM_RESTORE;
}
-media:
if (!mediaDevice) {
- if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
- return DITEM_FAILURE | DITEM_RESTORE;
+ if (!msgYesNo("You need to select a media type first. Do you want\n"
+ "to do this now?")) {
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
+ }
+ else
+ return DITEM_FAILURE | DITEM_RESTORE;
}
if (!mediaDevice->init(mediaDevice)) {
if (!msgYesNo("Unable to initialize selected media. Would you like to\n"
- "adjust your media configuration and try again?")) {
- mediaDevice = NULL;
- goto media;
+ "adjust your media configuration?")) {
+ if (!dmenuOpenSimple(&MenuMedia, FALSE) || !mediaDevice)
+ return DITEM_FAILURE | DITEM_RESTORE;
}
else
return DITEM_FAILURE | DITEM_RESTORE;
}
+ str = variable_get(SYSTEM_STATE);
+ if (isDebug())
+ msgDebug("installCommit: System state is `%s'\n", str);
+
if (RunningAsInit) {
/* Do things we wouldn't do to a multi-user system */
if (DITEM_STATUS((i = installInitial())) == DITEM_FAILURE)
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index 30bf9d5..063f4f6 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -460,7 +460,7 @@ static void
print_command_summary(void)
{
mvprintw(17, 0, "The following commands are valid here (upper or lower case):");
- mvprintw(18, 0, "C = Create D = Delete M = Mount");
+ mvprintw(18, 0, "C = Create D = Delete M = Mount pt.");
if (!RunningAsInit)
mvprintw(18, 47, "W = Write");
mvprintw(19, 0, "N = Newfs Opts T = Newfs Toggle U = Undo Q = Finish");
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c
index 33d461a..284bc0e 100644
--- a/usr.sbin/sysinstall/options.c
+++ b/usr.sbin/sysinstall/options.c
@@ -127,16 +127,16 @@ static Option Options[] = {
OPT_IS_VAR, RELNAME_PROMPT, VAR_RELNAME, varCheck },
{ "Install Root", "Which directory to unpack distributions or packages relative to",
OPT_IS_VAR, INSTROOT_PROMPT, VAR_INSTALL_ROOT, varCheck },
+{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
+ OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
+{ "Browser Exec", "This is the path to the main binary of the browser package",
+ OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
{ "Media Type", "The current installation media type.",
OPT_IS_FUNC, mediaGetType, VAR_MEDIA_TYPE, mediaCheck },
{ "Media Timeout", "Timeout value in seconds for slow media.",
OPT_IS_VAR, TIMEOUT_PROMPT, VAR_MEDIA_TIMEOUT, varCheck },
{ "Package Temp", "The directory where package temporary files should go",
OPT_IS_VAR, PKG_PROMPT, VAR_PKG_TMPDIR, varCheck },
-{ "Browser Exec", "This is the path to the main binary of the browser package",
- OPT_IS_VAR, BBIN_PROMPT, VAR_BROWSER_BINARY, varCheck },
-{ "Browser Pkg", "This is the browser package that will be used for viewing HTML docs",
- OPT_IS_VAR, BPKG_PROMPT, VAR_BROWSER_PACKAGE, varCheck },
{ "Apache package", "The name of the Apache package to install if requested",
OPT_IS_VAR, APACHE_PKG_PROMPT, VAR_APACHE_PKG, varCheck },
{ "Samba package", "The name of the Samba package to install if requested",
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 3de34c9..59a81a8 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -313,7 +313,7 @@ extern int DebugFD; /* Where diagnostic output goes */
extern Boolean Fake; /* Don't actually modify anything - testing */
extern Boolean SystemWasInstalled; /* Did we install it? */
extern Boolean RunningAsInit; /* Are we running stand-alone? */
-extern Boolean Chrooted; /* Yow, are we chrooted yet? */
+extern Boolean Chrooted; /* Are we chroot()ed? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Boolean ColorDisplay; /* Are we on a color display? */
extern Boolean OnVTY; /* On a syscons VTY? */
OpenPOWER on IntegriCloud