summaryrefslogtreecommitdiffstats
path: root/release
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-23 01:29:35 +0000
committerjkh <jkh@FreeBSD.org>1996-04-23 01:29:35 +0000
commite665fee23a1e8faaacaceda94ce45295956dee10 (patch)
tree61dd517d68f78c02b32b70a1ec457f1509801e87 /release
parent70a317a618a87b0eac973736356fadfa45b35959 (diff)
downloadFreeBSD-src-e665fee23a1e8faaacaceda94ce45295956dee10.zip
FreeBSD-src-e665fee23a1e8faaacaceda94ce45295956dee10.tar.gz
Bring this into sync.
I still have a _very very annoying_ display bug which occurs when a menu item causes a submenu to be displayed - the screen repaints for the original menu (which is restored upon return from the submenu) are off by about 4 characters. I've tried restoring the screen, the cursor position, you name it - same deal. Grrrr! This commit is my first step in trying to get someone else to help me look into this one since I'm just tearing my hair out at this point!
Diffstat (limited to 'release')
-rw-r--r--release/sysinstall/Makefile2
-rw-r--r--release/sysinstall/anonFTP.c19
-rw-r--r--release/sysinstall/apache.c89
-rw-r--r--release/sysinstall/attr.c3
-rw-r--r--release/sysinstall/cdrom.c9
-rw-r--r--release/sysinstall/config.c26
-rw-r--r--release/sysinstall/devices.c5
-rw-r--r--release/sysinstall/disks.c47
-rw-r--r--release/sysinstall/dist.c104
-rw-r--r--release/sysinstall/dmenu.c45
-rw-r--r--release/sysinstall/doc.c9
-rw-r--r--release/sysinstall/dos.c7
-rw-r--r--release/sysinstall/floppy.c16
-rw-r--r--release/sysinstall/ftp_strat.c11
-rw-r--r--release/sysinstall/index.c10
-rw-r--r--release/sysinstall/install.c95
-rw-r--r--release/sysinstall/installFinal.c20
-rw-r--r--release/sysinstall/installUpgrade.c31
-rw-r--r--release/sysinstall/label.c26
-rw-r--r--release/sysinstall/media.c41
-rw-r--r--release/sysinstall/menus.c237
-rw-r--r--release/sysinstall/misc.c6
-rw-r--r--release/sysinstall/network.c15
-rw-r--r--release/sysinstall/nfs.c7
-rw-r--r--release/sysinstall/options.c7
-rw-r--r--release/sysinstall/package.c7
-rw-r--r--release/sysinstall/sysinstall.h3
-rw-r--r--release/sysinstall/system.c10
-rw-r--r--release/sysinstall/tape.c6
-rw-r--r--release/sysinstall/tcpip.c7
-rw-r--r--release/sysinstall/variable.c6
31 files changed, 395 insertions, 531 deletions
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile
index c8bbe39..450eeb5 100644
--- a/release/sysinstall/Makefile
+++ b/release/sysinstall/Makefile
@@ -15,7 +15,7 @@ SRCS= anonFTP.c apache.c attr.c cdrom.c command.c config.c \
CFLAGS+= -Wall -I${.CURDIR}/../../gnu/lib/libdialog
DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL} ${LIBDISK}
-LDADD= /usr/src/gnu/lib/libdialog/obj/libdialog.a -lncurses -lmytinfo -lutil -ldisk
+LDADD= -ldialog -lncurses -lmytinfo -lutil -ldisk
makedevs.c: Makefile rtermcap
rm -f makedevs.tmp
diff --git a/release/sysinstall/anonFTP.c b/release/sysinstall/anonFTP.c
index 427e3f4..f4f152c 100644
--- a/release/sysinstall/anonFTP.c
+++ b/release/sysinstall/anonFTP.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: anonFTP.c,v 1.10 1996/04/07 03:52:16 jkh Exp $
+ * $Id: anonFTP.c,v 1.11 1996/04/13 13:31:19 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -211,7 +211,7 @@ createFtpUser(void)
}
/* This is it - how to get the setup values */
-int
+static int
anonftpOpenDialog(void)
{
WINDOW *ds_win;
@@ -405,9 +405,8 @@ configAnonFTP(dialogMenuItem *self)
dialog_clear();
i = anonftpOpenDialog();
if (i != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("Configuration of Anonymous FTP cancelled per user request.");
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
/*** Use defaults for any invalid values ***/
@@ -431,7 +430,7 @@ configAnonFTP(dialogMenuItem *self)
/*** If HomeDir does not exist, create it ***/
if (!directory_exists(tconf.homedir)) {
- vsystem("mkdir -p %s" ,tconf.homedir);
+ vsystem("mkdir -p %s", tconf.homedir);
}
if (directory_exists(tconf.homedir)) {
@@ -453,33 +452,25 @@ configAnonFTP(dialogMenuItem *self)
vsystem("chown -R %s.%s %s/pub", FTP_NAME, tconf.group, tconf.homedir);
}
else {
- dialog_clear();
msgConfirm("Unable to create FTP user! Anonymous FTP setup failed.");
i = DITEM_FAILURE;
}
- dialog_clear();
if (!msgYesNo("Create a welcome message file for anonymous FTP users?")) {
char cmd[256];
- WINDOW *w;
-
- w = savescr();
dialog_clear();
- msgNotify("Uncompressing the editor - please wait..");
vsystem("echo Your welcome message here. > %s/etc/%s", tconf.homedir, MOTD_FILE);
sprintf(cmd, "%s %s/etc/%s", variable_get(VAR_EDITOR), tconf.homedir, MOTD_FILE);
if (!systemExecute(cmd))
i = DITEM_SUCCESS;
else
i = DITEM_FAILURE;
- restorescr(w);
}
}
else {
- dialog_clear();
msgConfirm("Invalid Directory: %s\n"
"Anonymous FTP will not be set up.", tconf.homedir);
i = DITEM_FAILURE;
}
- return i;
+ return i | DITEM_RESTORE;
}
diff --git a/release/sysinstall/apache.c b/release/sysinstall/apache.c
index 8ce6405..ec74fbbb 100644
--- a/release/sysinstall/apache.c
+++ b/release/sysinstall/apache.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: apache.c,v 1.17 1996/04/07 03:52:16 jkh Exp $
+ * $Id: apache.c,v 1.18 1996/04/13 13:31:21 jkh Exp $
*
* Copyright (c) 1995
* Coranth Gryphon. All rights reserved.
@@ -185,7 +185,7 @@ static Layout layout[] = {
};
/* This is it - how to get Apache setup values */
-int
+static int
apacheOpenDialog(void)
{
WINDOW *ds_win;
@@ -403,12 +403,10 @@ configApache(dialogMenuItem *self)
/* Be optimistic */
i = DITEM_SUCCESS;
- dialog_clear();
msgConfirm("Since you elected to install the WEB server, we'll now add the\n"
"Apache HTTPD package and set up a few configuration files.");
i = package_add(APACHE_PACKAGE);
if (i != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("Hmmmmm. Looks like we weren't able to fetch the Apache WEB server\n"
"package. You may wish to fetch and configure it by hand by looking\n"
"in /usr/ports/net/apache (in the ports collection) or looking for the\n"
@@ -416,12 +414,12 @@ configApache(dialogMenuItem *self)
return DITEM_FAILURE;
}
+ dialog_clear();
i = apacheOpenDialog();
if (i != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("Configuration of the Apache WEB server was cancelled per\n"
"user request.");
- return DITEM_FAILURE;
+ return DITEM_FAILURE | DITEM_RESTORE;
}
/*** Fix defaults for invalid value ***/
if (! tconf.logdir[0])
@@ -457,9 +455,7 @@ configApache(dialogMenuItem *self)
if (directory_exists(tconf.docroot)) {
sprintf(file,"%s/%s", tconf.docroot, tconf.welcome);
if (!file_readable(file)) {
- dialog_clear();
- tptr = msgGetInput(NULL,
- "What is your company name?");
+ tptr = msgGetInput(NULL, "What is your company name?");
if (tptr && tptr[0])
strcpy(company, tptr);
else
@@ -497,7 +493,6 @@ configApache(dialogMenuItem *self)
}
}
else {
- dialog_clear();
msgConfirm("Unable to create Document Root Directory.");
i = DITEM_FAILURE;
}
@@ -523,7 +518,6 @@ configApache(dialogMenuItem *self)
fclose(fptr);
}
else {
- dialog_clear();
msgConfirm("Could not create %s",file);
i = DITEM_FAILURE;
}
@@ -560,7 +554,6 @@ configApache(dialogMenuItem *self)
fclose(fptr);
}
else {
- dialog_clear();
msgConfirm("Could not create %s",file);
i = DITEM_FAILURE;
}
@@ -570,52 +563,50 @@ configApache(dialogMenuItem *self)
vsystem("mv -f %s %s.ORIG", file, file);
fptr = fopen(file,"w");
if (fptr) {
- fprintf(fptr,"FancyIndexing on\n");
- fprintf(fptr,"DefaultType text/plain\n");
- fprintf(fptr,"IndexIgnore */.??* *~ *# */HEADER* */README* */RCS\n");
- fprintf(fptr,"HeaderName HEADER\n");
- fprintf(fptr,"ReadmeName README\n");
- fprintf(fptr,"AccessFileName .htaccess\n");
- fprintf(fptr,"\n");
- fprintf(fptr,"AddEncoding x-compress Z\n");
- fprintf(fptr,"AddEncoding x-gzip gz\n");
- fprintf(fptr,"DefaultIcon /icons/unknown.gif\n");
- fprintf(fptr,"\n");
- fprintf(fptr,
- "AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip\n");
- fprintf(fptr,"AddIconByType (TXT,/icons/text.gif) text/*\n");
- fprintf(fptr,"AddIconByType (IMG,/icons/image2.gif) image/*\n");
- fprintf(fptr,"AddIconByType (SND,/icons/sound2.gif) audio/*\n");
- fprintf(fptr,"AddIconByType (VID,/icons/movie.gif) video/*\n");
- fprintf(fptr,"\n");
+ fprintf(fptr, "FancyIndexing on\n");
+ fprintf(fptr, "DefaultType text/plain\n");
+ fprintf(fptr, "IndexIgnore */.??* *~ *# */HEADER* */README* */RCS\n");
+ fprintf(fptr, "HeaderName HEADER\n");
+ fprintf(fptr, "ReadmeName README\n");
+ fprintf(fptr, "AccessFileName .htaccess\n");
+ fprintf(fptr, "\n");
+ fprintf(fptr, "AddEncoding x-compress Z\n");
+ fprintf(fptr, "AddEncoding x-gzip gz\n");
+ fprintf(fptr, "DefaultIcon /icons/unknown.gif\n");
+ fprintf(fptr, "\n");
+ fprintf(fptr, "AddIconByEncoding (CMP,/icons/compressed.gif) x-compress x-gzip\n");
+ fprintf(fptr, "AddIconByType (TXT,/icons/text.gif) text/*\n");
+ fprintf(fptr, "AddIconByType (IMG,/icons/image2.gif) image/*\n");
+ fprintf(fptr, "AddIconByType (SND,/icons/sound2.gif) audio/*\n");
+ fprintf(fptr, "AddIconByType (VID,/icons/movie.gif) video/*\n");
+ fprintf(fptr, "\n");
- fprintf(fptr,"AddIcon /icons/text.gif .ps .shtml\n");
- fprintf(fptr,"AddIcon /icons/movie.gif .mpg .qt\n");
- fprintf(fptr,"AddIcon /icons/binary.gif .bin\n");
- fprintf(fptr,"AddIcon /icons/burst.gif .wrl\n");
- fprintf(fptr,"AddIcon /icons/binhex.gif .hqx .sit\n");
- fprintf(fptr,"AddIcon /icons/uu.gif .uu\n");
- fprintf(fptr,"AddIcon /icons/tar.gif .tar\n");
- fprintf(fptr,"AddIcon /icons/back.gif ..\n");
- fprintf(fptr,"AddIcon /icons/dir.gif ^^DIRECTORY^^\n");
- fprintf(fptr,"AddIcon /icons/blank.gif ^^BLANKICON^^\n");
- fprintf(fptr,"\n");
+ fprintf(fptr, "AddIcon /icons/text.gif .ps .shtml\n");
+ fprintf(fptr, "AddIcon /icons/movie.gif .mpg .qt\n");
+ fprintf(fptr, "AddIcon /icons/binary.gif .bin\n");
+ fprintf(fptr, "AddIcon /icons/burst.gif .wrl\n");
+ fprintf(fptr, "AddIcon /icons/binhex.gif .hqx .sit\n");
+ fprintf(fptr, "AddIcon /icons/uu.gif .uu\n");
+ fprintf(fptr, "AddIcon /icons/tar.gif .tar\n");
+ fprintf(fptr, "AddIcon /icons/back.gif ..\n");
+ fprintf(fptr, "AddIcon /icons/dir.gif ^^DIRECTORY^^\n");
+ fprintf(fptr, "AddIcon /icons/blank.gif ^^BLANKICON^^\n");
+ fprintf(fptr, "\n");
- fprintf(fptr,"ScriptAlias /cgi_bin/ %s/cgi_bin/\n",APACHE_BASE);
- fprintf(fptr,"Alias /icons/ %s/icons/\n",APACHE_BASE);
- fprintf(fptr,"DocumentRoot %s\n",tconf.docroot);
- fprintf(fptr,"UserDir %s\n", tconf.userdir);
- fprintf(fptr,"DirectoryIndex %s\n", tconf.welcome);
- fprintf(fptr,"\n");
+ fprintf(fptr, "ScriptAlias /cgi_bin/ %s/cgi_bin/\n",APACHE_BASE);
+ fprintf(fptr, "Alias /icons/ %s/icons/\n",APACHE_BASE);
+ fprintf(fptr, "DocumentRoot %s\n",tconf.docroot);
+ fprintf(fptr, "UserDir %s\n", tconf.userdir);
+ fprintf(fptr, "DirectoryIndex %s\n", tconf.welcome);
+ fprintf(fptr, "\n");
fclose(fptr);
}
else {
- dialog_clear();
msgConfirm("Could not create %s",file);
i = DITEM_FAILURE;
}
if (i != DITEM_FAILURE)
variable_set2("apache_httpd", "YES");
- return i;
+ return i | DITEM_RESTORE;
}
diff --git a/release/sysinstall/attr.c b/release/sysinstall/attr.c
index ee3342f..b65cd0c 100644
--- a/release/sysinstall/attr.c
+++ b/release/sysinstall/attr.c
@@ -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: attr.c,v 1.4 1995/12/07 10:33:30 peter Exp $
+ * $Id: attr.c,v 1.5 1996/04/13 13:31:22 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -47,7 +47,6 @@ attr_parse_file(Attribs *attr, char *file)
int fd;
if ((fd = open(file, O_RDONLY)) == -1) {
- dialog_clear();
msgConfirm("Cannot open the information file `%s': %s (%d)", file, strerror(errno), errno);
return DITEM_FAILURE;
}
diff --git a/release/sysinstall/cdrom.c b/release/sysinstall/cdrom.c
index 83c38da..5e1dbcf 100644
--- a/release/sysinstall/cdrom.c
+++ b/release/sysinstall/cdrom.c
@@ -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: cdrom.c,v 1.11 1996/03/18 15:27:43 jkh Exp $
+ * $Id: cdrom.c,v 1.12 1996/04/13 13:31:23 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -81,7 +81,6 @@ mediaInitCDROM(Device *dev)
if (directory_exists("/cdrom/dists"))
cdromMounted = 2;
else if (mount(MOUNT_CD9660, "/cdrom", MNT_RDONLY, (caddr_t) &args) == -1) {
- dialog_clear();
msgConfirm("Error mounting %s on /cdrom: %s (%u)", dev->devname, strerror(errno), errno);
return FALSE;
}
@@ -93,14 +92,12 @@ mediaInitCDROM(Device *dev)
snprintf(specialrel, 80, "/cdrom/%s/dists", variable_get(VAR_RELNAME));
if (stat("/cdrom/dists", &sb) && stat(specialrel, &sb)) {
if (errno == ENOENT) {
- dialog_clear();
msgConfirm("Couldn't locate the directory `dists' anywhere on the CD.\n"
"Is this a FreeBSD CDROM? Is the release version set properly\n"
"in the Options editor?");
return FALSE;
}
else {
- dialog_clear();
msgConfirm("Error trying to stat the CDROM's dists directory: %s", strerror(errno));
return FALSE;
}
@@ -135,10 +132,8 @@ mediaShutdownCDROM(Device *dev)
if (!RunningAsInit || !cdromMounted || cdromMounted == 2)
return;
msgDebug("Unmounting %s from /cdrom\n", dev->devname);
- if (unmount("/cdrom", MNT_FORCE) != 0) {
- dialog_clear();
+ if (unmount("/cdrom", MNT_FORCE) != 0)
msgConfirm("Could not unmount the CDROM from /cdrom: %s", strerror(errno));
- }
msgDebug("Unmount successful\n");
cdromMounted = 0;
return;
diff --git a/release/sysinstall/config.c b/release/sysinstall/config.c
index de74386..1c0ef70 100644
--- a/release/sysinstall/config.c
+++ b/release/sysinstall/config.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: config.c,v 1.23 1996/04/07 03:52:18 jkh Exp $
+ * $Id: config.c,v 1.24 1996/04/13 13:31:25 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -151,7 +151,6 @@ configFstab(void)
if (file_readable("/etc/fstab"))
return DITEM_SUCCESS;
else {
- dialog_clear();
msgConfirm("Attempting to rebuild your /etc/fstab file. Warning: If you had\n"
"any CD devices in use before running sysinstall then they may NOT\n"
"be found by this run!");
@@ -160,7 +159,6 @@ configFstab(void)
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
- dialog_clear();
msgConfirm("No disks found!");
return DITEM_FAILURE;
}
@@ -189,7 +187,6 @@ configFstab(void)
fstab = fopen("/etc/fstab", "w");
if (!fstab) {
- dialog_clear();
msgConfirm("Unable to create a new /etc/fstab file! Manual intervention\n"
"will be required.");
return DITEM_FAILURE;
@@ -210,7 +207,6 @@ configFstab(void)
/* Write the first one out as /cdrom */
if (cnt) {
if (Mkdir("/cdrom", NULL)) {
- dialog_clear();
msgConfirm("Unable to make mount point for: /cdrom");
}
else
@@ -223,7 +219,6 @@ configFstab(void)
sprintf(cdname, "/cdrom%d", i);
if (Mkdir(cdname, NULL)) {
- dialog_clear();
msgConfirm("Unable to make mount point for: %s", cdname);
}
else
@@ -252,7 +247,6 @@ configSysconfig(void)
fp = fopen("/etc/sysconfig", "r");
if (!fp) {
- dialog_clear();
msgConfirm("Unable to open /etc/sysconfig file! Things may work\n"
"rather strangely as a result of this.");
return;
@@ -335,8 +329,9 @@ int
configXFree86(dialogMenuItem *self)
{
if (file_executable("/usr/X11R6/bin/xf86config")) {
+ dialog_clear();
systemExecute("/usr/X11R6/bin/xf86config");
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
else {
msgConfirm("XFree86 does not appear to be installed! Please install\n"
@@ -355,22 +350,18 @@ configResolv(void)
return;
if (!variable_get(VAR_NAMESERVER)) {
- if (mediaDevice && (mediaDevice->type == DEVICE_TYPE_NFS || mediaDevice->type == DEVICE_TYPE_FTP)) {
- dialog_clear();
+ if (mediaDevice && (mediaDevice->type == DEVICE_TYPE_NFS || mediaDevice->type == DEVICE_TYPE_FTP))
msgConfirm("Warning: Missing name server value - network operations\n"
"may fail as a result!");
- }
goto skip;
}
if (Mkdir("/etc", NULL)) {
- dialog_clear();
msgConfirm("Unable to create /etc directory. Network configuration\n"
"files will therefore not be written!");
return;
}
fp = fopen("/etc/resolv.conf", "w");
if (!fp) {
- dialog_clear();
msgConfirm("Unable to open /etc/resolv.conf! You will need to do this manually.");
return;
}
@@ -430,7 +421,6 @@ configPackages(dialogMenuItem *self)
msgNotify("Attempting to fetch packages/INDEX file from selected media.");
fd = mediaDevice->get(mediaDevice, "packages/INDEX", TRUE);
if (fd < 0) {
- dialog_clear();
msgConfirm("Unable to get packages/INDEX file from selected media.\n"
"This may be because the packages collection is not available at\n"
"on the distribution media you've chosen (most likely an FTP site\n"
@@ -443,7 +433,6 @@ configPackages(dialogMenuItem *self)
msgNotify("Got INDEX successfully, now building packages menu..");
index_init(&top, &plist);
if (index_read(fd, &top)) {
- dialog_clear();
msgConfirm("I/O or format error on packages/INDEX file.\n"
"Please verify media (or path to media) and try again.");
mediaDevice->close(mediaDevice, fd);
@@ -472,7 +461,6 @@ configPackages(dialogMenuItem *self)
}
}
else {
- dialog_clear();
msgConfirm("No packages were selected for extraction.");
break;
}
@@ -512,11 +500,8 @@ configPorts(dialogMenuItem *self)
"as you'll need space to compile any ports.");
if (!cp || !*cp)
return DITEM_FAILURE;
- if (Mkdir(cp, NULL)) {
- dialog_clear();
- msgConfirm("Unable to make the %s directory!", cp);
+ if (Mkdir(cp, NULL))
return DITEM_FAILURE;
- }
else {
if (strcmp(cp, "/usr/ports")) {
unlink("/usr/ports");
@@ -535,7 +520,6 @@ configPorts(dialogMenuItem *self)
}
msgNotify("Making a link tree from %s to %s.", dist, cp);
if (lndir(dist, cp) != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("The lndir function returned an error status and may not have.\n"
"successfully generated the link tree. You may wish to inspect\n"
"the /usr/ports directory carefully for any missing link files.");
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index f3f615f..b64c736 100644
--- a/release/sysinstall/devices.c
+++ b/release/sysinstall/devices.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: devices.c,v 1.43 1996/04/07 03:52:19 jkh Exp $
+ * $Id: devices.c,v 1.44 1996/04/13 13:31:27 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -279,12 +279,10 @@ deviceGetAll(void)
s = socket(AF_INET, SOCK_DGRAM, 0);
if (s < 0) {
- dialog_clear();
msgConfirm("ifconfig: socket");
return;
}
if (ioctl(s, SIOCGIFCONF, (char *) &ifc) < 0) {
- dialog_clear();
msgConfirm("ifconfig (SIOCGIFCONF)");
return;
}
@@ -303,7 +301,6 @@ deviceGetAll(void)
msgDebug("Found a device of type network named: %s\n", ifptr->ifr_name);
close(s);
if ((s = socket(AF_INET, SOCK_DGRAM, 0)) < 0) {
- dialog_clear();
msgConfirm("ifconfig: socket");
continue;
}
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index d151dac..54f0fc6 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: disks.c,v 1.39 1996/04/07 03:52:20 jkh Exp $
+ * $Id: disks.c,v 1.40 1996/04/13 13:31:28 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -73,7 +73,6 @@ print_chunks(Disk *d)
if ((!d->bios_cyl || d->bios_cyl > 65536) || (!d->bios_hd || d->bios_hd > 256) || (!d->bios_sect || d->bios_sect >= 64)) {
int sz;
- dialog_clear();
msgConfirm("WARNING: The current geometry for %s is incorrect. Using\n"
"a default geometry of 64 heads and 32 sectors. If this geometry\n"
"is incorrect or you are unsure as to whether or not it's correct,\n"
@@ -175,10 +174,12 @@ diskPartition(Device *dev, Disk *d)
Boolean chunking;
char *msg = NULL;
u_char *mbrContents;
+ WINDOW *w;
chunking = TRUE;
keypad(stdscr, TRUE);
+ w = savescr();
clear();
record_chunks(d);
while (chunking) {
@@ -325,9 +326,8 @@ diskPartition(Device *dev, Disk *d)
break;
d = Open_Disk(d->name);
if (!d) {
- dialog_clear();
msgConfirm("Can't reopen disk %s! Internal state is probably corrupted", d->name);
- return;
+ break;
}
Free_Disk(dev->private);
dev->private = d;
@@ -353,19 +353,19 @@ diskPartition(Device *dev, Disk *d)
&& (mbrContents = getBootMgr(d->name)) != NULL)
Set_Boot_Mgr(d, mbrContents);
- if (diskPartitionWrite(NULL) != DITEM_SUCCESS) {
- dialog_clear();
+ if (diskPartitionWrite(NULL) != DITEM_SUCCESS)
msgConfirm("Disk partition write returned an error status!");
- }
- else {
+ else
msgConfirm("Wrote FDISK partition information out successfully.");
- }
}
break;
case '|':
if (!msgYesNo("Are you SURE you want to go into Wizard mode?\n"
"No seat belts whatsoever are provided!")) {
+ WINDOW *w;
+
+ w = savescr();
dialog_clear();
end_dialog();
DialogActive = FALSE;
@@ -374,6 +374,7 @@ diskPartition(Device *dev, Disk *d)
dialog_clear();
DialogActive = TRUE;
record_chunks(d);
+ restorescr(w);
}
else
msg = "Wise choice!";
@@ -403,25 +404,21 @@ diskPartition(Device *dev, Disk *d)
msgConfirm(p);
free(p);
}
- dialog_clear();
+ restorescr(w);
}
static int
partitionHook(dialogMenuItem *selected)
{
Device **devs = NULL;
- WINDOW *w;
devs = deviceFind(selected->prompt, DEVICE_TYPE_DISK);
if (!devs) {
- dialog_clear();
msgConfirm("Unable to find disk %s!", selected->prompt);
return DITEM_FAILURE;
}
devs[0]->enabled = TRUE;
- w = savescr();
diskPartition(devs[0], (Disk *)devs[0]->private);
- restorescr(w);
return DITEM_SUCCESS;
}
@@ -448,7 +445,6 @@ diskPartitionEditor(dialogMenuItem *self)
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
- dialog_clear();
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.");
@@ -462,7 +458,6 @@ diskPartitionEditor(dialogMenuItem *self)
else {
menu = deviceCreateMenu(&MenuDiskDevices, DEVICE_TYPE_DISK, partitionHook, partitionCheck);
if (!menu) {
- dialog_clear();
msgConfirm("No devices suitable for installation found!\n\n"
"Please verify that your disk controller (and attached drives)\n"
"were detected properly. This can be done by pressing the\n"
@@ -471,14 +466,7 @@ diskPartitionEditor(dialogMenuItem *self)
i = DITEM_FAILURE;
}
else {
- WINDOW *w;
-
- w = savescr();
- if (dmenuOpenSimple(menu))
- i = DITEM_SUCCESS;
- else
- i = DITEM_FAILURE;
- restorescr(w);
+ i = dmenuOpenSimple(menu) ? DITEM_SUCCESS : DITEM_FAILURE;
free(menu);
}
}
@@ -495,14 +483,12 @@ diskPartitionWrite(dialogMenuItem *self)
if ((cp = variable_get(DISK_PARTITIONED)) && strcmp(cp, "yes"))
return DITEM_SUCCESS;
else if (!cp) {
- dialog_clear();
msgConfirm("You must partition the disk(s) before this option can be used.");
return DITEM_FAILURE;
}
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
- dialog_clear();
msgConfirm("Unable to find any disks to write to??");
return DITEM_FAILURE;
}
@@ -517,7 +503,6 @@ diskPartitionWrite(dialogMenuItem *self)
Set_Boot_Blocks(d, boot1, boot2);
msgNotify("Writing partition information to drive %s", d->name);
if (Write_Disk(d)) {
- dialog_clear();
msgConfirm("ERROR: Unable to write data to disk %s!", d->name);
return DITEM_FAILURE;
}
@@ -528,15 +513,11 @@ diskPartitionWrite(dialogMenuItem *self)
msgNotify("Running bad block scan on partition %s", c1->name);
ret = vsystem("bad144 -v /dev/r%s 1234", c1->name);
- if (ret) {
- dialog_clear();
+ if (ret)
msgConfirm("Bad144 init on %s returned status of %d!", c1->name, ret);
- }
ret = vsystem("bad144 -v -s /dev/r%s", c1->name);
- if (ret) {
- dialog_clear();
+ if (ret)
msgConfirm("Bad144 scan on %s returned status of %d!", c1->name, ret);
- }
}
}
}
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index 2a4b5a9..52573c2 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: dist.c,v 1.40 1996/04/07 03:52:22 jkh Exp $
+ * $Id: dist.c,v 1.41 1996/04/13 13:31:30 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -165,7 +165,15 @@ distReset(dialogMenuItem *self)
XF86Dists = 0;
XF86ServerDists = 0;
XF86FontDists = 0;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+int
+distSrcReset(dialogMenuItem *self)
+{
+ Dists &= ~DIST_SRC;
+ SrcDists = 0;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
int
@@ -174,7 +182,7 @@ distSetDeveloper(dialogMenuItem *self)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_ALL;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
int
@@ -186,8 +194,7 @@ distSetXDeveloper(dialogMenuItem *self)
XF86Dists = DIST_XF86_BIN | DIST_XF86_LIB | DIST_XF86_PROG | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
XF86ServerDists = DIST_XF86_SERVER_SVGA;
XF86FontDists = DIST_XF86_FONTS_MISC;
- distSetXF86(NULL);
- return DITEM_SUCCESS;
+ return distSetXF86(NULL);
}
int
@@ -196,7 +203,7 @@ distSetKernDeveloper(dialogMenuItem *self)
distReset(NULL);
Dists = _DIST_DEVELOPER;
SrcDists = DIST_SRC_SYS;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
int
@@ -204,7 +211,7 @@ distSetUser(dialogMenuItem *self)
{
distReset(NULL);
Dists = _DIST_USER;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
int
@@ -215,8 +222,7 @@ distSetXUser(dialogMenuItem *self)
XF86Dists = DIST_XF86_BIN | DIST_XF86_LIB | DIST_XF86_MAN | DIST_XF86_SERVER | DIST_XF86_FONTS;
XF86ServerDists = DIST_XF86_SERVER_SVGA;
XF86FontDists = DIST_XF86_FONTS_MISC;
- distSetXF86(NULL);
- return DITEM_SUCCESS;
+ return distSetXF86(NULL);
}
int
@@ -224,7 +230,7 @@ distSetMinimum(dialogMenuItem *self)
{
distReset(NULL);
Dists = DIST_BIN;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
int
@@ -235,56 +241,59 @@ distSetEverything(dialogMenuItem *self)
XF86Dists = DIST_XF86_ALL;
XF86ServerDists = DIST_XF86_SERVER_ALL;
XF86FontDists = DIST_XF86_FONTS_ALL;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
int
distSetDES(dialogMenuItem *self)
{
- WINDOW *w;
-
- w = savescr();
- dmenuOpenSimple(&MenuDESDistributions);
- if (DESDists) {
- if (DESDists & DIST_DES_KERBEROS)
- DESDists |= DIST_DES_DES;
- Dists |= DIST_DES;
+ int i = DITEM_SUCCESS;
+
+ if (dmenuOpenSimple(&MenuDESDistributions)) {
+ if (DESDists) {
+ if (DESDists & DIST_DES_KERBEROS)
+ DESDists |= DIST_DES_DES;
+ Dists |= DIST_DES;
+ }
}
- restorescr(w);
- return DITEM_SUCCESS;
+ else
+ i = DITEM_FAILURE;
+ return i | DITEM_RESTORE;
}
int
distSetSrc(dialogMenuItem *self)
{
- WINDOW *w;
+ int i = DITEM_SUCCESS;
- w = savescr();
- dmenuOpenSimple(&MenuSrcDistributions);
- if (SrcDists)
- Dists |= DIST_SRC;
- restorescr(w);
- return DITEM_SUCCESS;
+ if (dmenuOpenSimple(&MenuSrcDistributions)) {
+ if (SrcDists)
+ Dists |= DIST_SRC;
+ }
+ else
+ i = DITEM_FAILURE;
+ return i | DITEM_RESTORE;
}
int
distSetXF86(dialogMenuItem *self)
{
- WINDOW *w;
-
- w = savescr();
- dmenuOpenSimple(&MenuXF86Select);
- if (XF86ServerDists)
- XF86Dists |= DIST_XF86_SERVER;
- if (XF86FontDists)
- XF86Dists |= DIST_XF86_FONTS;
- if (XF86Dists)
- Dists |= DIST_XF86;
- if (isDebug())
- msgDebug("SetXF86 Masks: Server: %0x, Fonts: %0x, XDists: %0x, Dists: %0x\n",
- XF86ServerDists, XF86FontDists, XF86Dists, Dists);
- restorescr(w);
- return DITEM_SUCCESS;
+ int i = DITEM_SUCCESS;
+
+ if (dmenuOpenSimple(&MenuXF86Select)) {
+ if (XF86ServerDists)
+ XF86Dists |= DIST_XF86_SERVER;
+ if (XF86FontDists)
+ XF86Dists |= DIST_XF86_FONTS;
+ if (XF86Dists)
+ Dists |= DIST_XF86;
+ if (isDebug())
+ msgDebug("SetXF86 Masks: Server: %0x, Fonts: %0x, XDists: %0x, Dists: %0x\n",
+ XF86ServerDists, XF86FontDists, XF86Dists, Dists);
+ }
+ else
+ i = DITEM_FAILURE;
+ return i | DITEM_RESTORE;
}
static Boolean
@@ -350,11 +359,9 @@ distExtract(char *parent, Distribution *me)
if (isDebug())
msgDebug("Parsing attributes file for distribution %s\n", dist);
dist_attr = safe_malloc(sizeof(Attribs) * MAX_ATTRIBS);
- if (attr_parse_file(dist_attr, buf) == DITEM_FAILURE) {
- dialog_clear();
+ if (attr_parse_file(dist_attr, buf) == DITEM_FAILURE)
msgConfirm("Cannot load information file for %s distribution!\n"
"Please verify that your media is valid and try again.", dist);
- }
else {
if (isDebug())
msgDebug("Looking for attribute `pieces'\n");
@@ -373,7 +380,6 @@ distExtract(char *parent, Distribution *me)
/* We have one or more chunks, go pick them up */
mediaExtractDistBegin(me[i].my_dir, &fd2, &zpid, &cpid);
- dialog_clear();
for (chunk = 0; chunk < numchunks; chunk++) {
int n, retval;
char prompt[80];
@@ -383,7 +389,6 @@ distExtract(char *parent, Distribution *me)
msgDebug("trying for piece %d of %d: %s\n", chunk + 1, numchunks, buf);
fd = mediaDevice->get(mediaDevice, buf, FALSE);
if (fd < 0) {
- dialog_clear();
msgConfirm("failed to retreive piece file %s!\nAborting the transfer", buf);
goto punt;
}
@@ -416,7 +421,6 @@ distExtract(char *parent, Distribution *me)
status = TRUE;
else {
if (me[i].my_dist) {
- dialog_clear();
msgConfirm("Unable to transfer all components of the %s distribution.\n"
"If this is a CDROM install, it may be because export restrictions prohibit\n"
"DES code from being shipped from the U.S. Try to get this code from a\n"
@@ -424,7 +428,6 @@ distExtract(char *parent, Distribution *me)
status = TRUE;
}
else {
- dialog_clear();
status = msgYesNo("Unable to transfer the %s distribution from %s.\n"
"Do you want to try to retrieve it again?",
me[i].my_name, mediaDevice->name);
@@ -486,7 +489,6 @@ distExtractAll(dialogMenuItem *self)
if (Dists) {
printSelected(buf, Dists, DistTable);
- dialog_clear();
msgConfirm("Couldn't extract all of the distributions. This may\n"
"be because the following distributions are not available on the\n"
"installation media you've chosen:\n\n\t%s", buf);
diff --git a/release/sysinstall/dmenu.c b/release/sysinstall/dmenu.c
index 1a366b0..8081dd7 100644
--- a/release/sysinstall/dmenu.c
+++ b/release/sysinstall/dmenu.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: dmenu.c,v 1.15 1996/04/07 03:52:23 jkh Exp $
+ * $Id: dmenu.c,v 1.16 1996/04/13 13:31:31 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -45,45 +45,39 @@ int
dmenuDisplayFile(dialogMenuItem *tmp)
{
systemDisplayHelp((char *)tmp->data);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
int
dmenuSubmenu(dialogMenuItem *tmp)
{
- WINDOW *w;
+ int i;
- w = savescr();
- dialog_clear();
- (void)dmenuOpenSimple((DMenu *)tmp->data);
- restorescr(w);
- return DITEM_SUCCESS;
+ i = dmenuOpenSimple((DMenu *)tmp->data) ? DITEM_SUCCESS : DITEM_FAILURE;
+ return i | DITEM_RESTORE;
}
int
-dmenuSystemCommand(dialogMenuItem *tmp)
+dmenuSystemCommand(dialogMenuItem *self)
{
- WINDOW *w;
-
- w = savescr();
- systemExecute((char *)tmp->data);
- dialog_clear();
- restorescr(w);
+ WINDOW *w = NULL; /* Keep lint happy */
+
+ /* If aux is set, the command is known not to produce any screen-spoiling output */
+ if (!self->aux)
+ w = savescr();
+ systemExecute((char *)self->data);
+ if (!self->aux)
+ restorescr(w);
return DITEM_SUCCESS;
}
int
dmenuSystemCommandBox(dialogMenuItem *tmp)
{
- WINDOW *w;
-
- w = savescr();
use_helpfile(NULL);
use_helpline("Select OK to dismiss this dialog");
dialog_prgbox(tmp->title, (char *)tmp->data, 22, 76, 1, 1);
- dialog_clear();
- restorescr(w);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
int
@@ -97,7 +91,6 @@ int
dmenuSetVariable(dialogMenuItem *tmp)
{
variable_set((char *)tmp->data);
- msgInfo("Set %s", tmp->data);
return DITEM_SUCCESS;
}
@@ -125,7 +118,6 @@ dmenuOpenSimple(DMenu *menu)
int choice, scroll, curr, max;
choice = scroll = curr = max = 0;
- dialog_clear();
return dmenuOpen(menu, &choice, &scroll, &curr, &max);
}
@@ -195,6 +187,7 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
use_helpfile(systemHelpFile(menu->helpfile, buf));
/* Pop up that dialog! */
+ dialog_clear();
if (menu->type & DMENU_NORMAL_TYPE)
rval = dialog_menu((u_char *)menu->title, (u_char *)menu->prompt, -1, -1,
menu_height(menu, n), -n, menu->items, NULL, choice, scroll);
@@ -209,11 +202,9 @@ dmenuOpen(DMenu *menu, int *choice, int *scroll, int *curr, int *max)
else
msgFatal("Menu: `%s' is of an unknown type\n", menu->title);
- /* This seems to be the only technique that works for getting the display to look right */
- dialog_clear();
- if (rval || menu->type & (DMENU_SELECTION_RETURNS | DMENU_RADIO_TYPE | DMENU_CHECKLIST_TYPE))
+ if (rval)
return FALSE;
- else if (cancelled) {
+ else if (cancelled || (menu->type & (DMENU_SELECTION_RETURNS | DMENU_RADIO_TYPE | DMENU_CHECKLIST_TYPE))) {
cancelled = FALSE;
return TRUE;
}
diff --git a/release/sysinstall/doc.c b/release/sysinstall/doc.c
index 8a7e897..dc3e20f 100644
--- a/release/sysinstall/doc.c
+++ b/release/sysinstall/doc.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: dmenu.c,v 1.15 1996/04/07 03:52:23 jkh Exp $
+ * $Id: doc.c,v 1.12 1996/04/13 13:31:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,12 @@ docBrowser(dialogMenuItem *self)
/* First, make sure we have whatever browser we've chosen is here */
if (package_add(browser) != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("Unable to install the %s HTML browser package. You may\n"
"wish to verify that your media is configured correctly and\n"
"try again.", browser);
return DITEM_FAILURE;
}
if (!file_executable(variable_get(VAR_BROWSER_BINARY))) {
- dialog_clear();
if (!msgYesNo("Hmmm. The %s package claims to have installed, but I can't\n"
"find its binary in %s! You may wish to try a different\n"
"location to load the package from (go to Media menu) and see if that\n"
@@ -92,7 +90,6 @@ docShowDocument(dialogMenuItem *self)
char *str = self->prompt;
if (!file_executable(browser)) {
- dialog_clear();
msgConfirm("Can't find the browser in %s! Please ensure that it's\n"
"properly set in the Options editor.", browser);
return DITEM_FAILURE;
@@ -115,8 +112,9 @@ docShowDocument(dialogMenuItem *self)
}
if (where) {
sprintf(tmp, "%s %s", browser, where);
+ dialog_clear();
systemExecute(tmp);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
else {
msgConfirm("Hmmmmm! I can't seem to access the documentation you selected!\n"
@@ -124,4 +122,3 @@ docShowDocument(dialogMenuItem *self)
return DITEM_FAILURE;
}
}
-
diff --git a/release/sysinstall/dos.c b/release/sysinstall/dos.c
index 0df2d1a..fa24cdb 100644
--- a/release/sysinstall/dos.c
+++ b/release/sysinstall/dos.c
@@ -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: dos.c,v 1.9 1996/03/02 07:31:52 jkh Exp $
+ * $Id: dos.c,v 1.10 1996/04/13 13:31:33 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -68,7 +68,6 @@ mediaInitDOS(Device *dev)
args.mask = 0777;
if (mount(MOUNT_MSDOS, "/dos", MNT_RDONLY, (caddr_t)&args) == -1) {
- dialog_clear();
msgConfirm("Error mounting %s on /dos: %s (%u)", args.fspec, strerror(errno), errno);
return FALSE;
}
@@ -103,10 +102,8 @@ mediaShutdownDOS(Device *dev)
if (!RunningAsInit || !DOSMounted)
return;
msgDebug("Unmounting %s from /dos\n", dev->name);
- if (unmount("/dos", MNT_FORCE) != 0) {
- dialog_clear();
+ if (unmount("/dos", MNT_FORCE) != 0)
msgConfirm("Could not unmount the DOS partition: %s", strerror(errno));
- }
if (isDebug())
msgDebug("Unmount successful\n");
DOSMounted = FALSE;
diff --git a/release/sysinstall/floppy.c b/release/sysinstall/floppy.c
index 2479bb2..16b5301 100644
--- a/release/sysinstall/floppy.c
+++ b/release/sysinstall/floppy.c
@@ -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: floppy.c,v 1.9 1996/03/02 07:31:52 jkh Exp $
+ * $Id: floppy.c,v 1.10 1996/04/13 13:31:34 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -81,13 +81,11 @@ getRootFloppy(void)
devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY);
cnt = deviceCount(devs);
if (!cnt) {
- dialog_clear();
msgConfirm("No floppy devices found! Something is seriously wrong!");
return -1;
}
else if (cnt == 1) {
floppyDev = devs[0];
- dialog_clear();
msgConfirm("Please insert the ROOT floppy in %s and press [ENTER]", floppyDev->description);
}
else {
@@ -117,19 +115,14 @@ mediaInitFloppy(Device *dev)
return TRUE;
if (Mkdir("/dist", NULL)) {
- dialog_clear();
msgConfirm("Unable to make directory mountpoint for %s!", dev->devname);
return FALSE;
}
msgDebug("Init floppy called for %s distribution.\n", distWanted ? distWanted : "some");
- if (!distWanted) {
- dialog_clear();
+ if (!distWanted)
msgConfirm("Please insert next floppy into %s", dev->description);
- }
- else {
- dialog_clear();
+ else
msgConfirm("Please insert floppy containing %s into %s", distWanted, dev->description);
- }
memset(&dosargs, 0, sizeof dosargs);
dosargs.fspec = dev->devname;
@@ -141,7 +134,6 @@ mediaInitFloppy(Device *dev)
if (mount(MOUNT_MSDOS, "/dist", MNT_RDONLY, (caddr_t)&dosargs) == -1) {
if (mount(MOUNT_UFS, "/dist", MNT_RDONLY, (caddr_t)&u_args) == -1) {
- dialog_clear();
msgConfirm("Error mounting floppy %s (%s) on /dist : %s", dev->name, dev->devname, strerror(errno));
return FALSE;
}
@@ -168,7 +160,6 @@ mediaGetFloppy(Device *dev, char *file, Boolean probe)
else {
while (!file_readable(buf)) {
if (!--nretries) {
- dialog_clear();
msgConfirm("GetFloppy: Failed to get %s after retries;\ngiving up.", buf);
return -1;
}
@@ -192,7 +183,6 @@ mediaShutdownFloppy(Device *dev)
else {
floppyMounted = FALSE;
msgDebug("Floppy unmounted successfully.\n");
- dialog_clear();
msgConfirm("You may remove the floppy from %s", dev->description);
}
}
diff --git a/release/sysinstall/ftp_strat.c b/release/sysinstall/ftp_strat.c
index 860d724..480b725 100644
--- a/release/sysinstall/ftp_strat.c
+++ b/release/sysinstall/ftp_strat.c
@@ -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: ftp_strat.c,v 1.11 1996/03/21 09:30:09 jkh Exp $
+ * $Id: ftp_strat.c,v 1.12 1996/04/13 13:31:37 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -63,7 +63,6 @@ get_new_host(Device *dev, Boolean probe)
i = TRUE;
else {
i = FALSE;
- dialog_clear();
msgConfirm("The %s file failed to load from the FTP site you\n"
"selected. Please select another one from the FTP menu.", lastRequest ? lastRequest : "requested");
MenuMediaFTP.title = "Request failed - please select another site";
@@ -121,13 +120,11 @@ mediaInitFTP(Device *dev)
return FALSE;
if (!ftp && (ftp = FtpInit()) == NULL) {
- dialog_clear();
msgConfirm("FTP initialisation failed!");
return FALSE;
}
cp = variable_get(VAR_FTP_PATH);
if (!cp) {
- dialog_clear();
msgConfirm("%s is not set!", VAR_FTP_PATH);
return FALSE;
}
@@ -135,7 +132,6 @@ mediaInitFTP(Device *dev)
msgDebug("Attempting to open connection for URL: %s\n", cp);
hostname = variable_get(VAR_HOSTNAME);
if (strncmp("ftp://", cp, 6) != NULL) {
- dialog_clear();
msgConfirm("Invalid URL: %s\n(A URL must start with `ftp://' here)", cp);
return FALSE;
}
@@ -158,7 +154,6 @@ mediaInitFTP(Device *dev)
}
msgNotify("Looking up host %s..", hostname);
if ((gethostbyname(hostname) == NULL) && (inet_addr(hostname) == INADDR_NONE)) {
- dialog_clear();
msgConfirm("Cannot resolve hostname `%s'! Are you sure that your\n"
"name server, gateway and network interface are correctly configured?", hostname);
netDevice->shutdown(netDevice);
@@ -181,10 +176,8 @@ retry:
if (FtpOpen(ftp, hostname, login_name, password) != 0) {
if (variable_get(VAR_NO_CONFIRM))
msgNotify("Couldn't open FTP connection to %s", hostname);
- else {
- dialog_clear();
+ else
msgConfirm("Couldn't open FTP connection to %s", hostname);
- }
if (ftpShouldAbort(dev, ++retries) || !get_new_host(dev, FALSE))
return FALSE;
goto retry;
diff --git a/release/sysinstall/index.c b/release/sysinstall/index.c
index 9b45a41..754740f 100644
--- a/release/sysinstall/index.c
+++ b/release/sysinstall/index.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: index.c,v 1.22 1996/03/21 09:30:11 jkh Exp $
+ * $Id: index.c,v 1.23 1996/04/13 13:31:39 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -430,10 +430,12 @@ index_menu(PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll)
PkgNodePtr kp;
dialogMenuItem *nitems;
Boolean hasPackages;
+ WINDOW *w;
hasPackages = FALSE;
nitems = NULL;
+ w = savescr();
n = maxname = 0;
/* Figure out if this menu is full of "leaves" or "branches" */
for (kp = top->kids; kp && kp->name; kp = kp->next) {
@@ -447,8 +449,8 @@ index_menu(PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll)
}
}
if (!n && plist) {
- dialog_clear();
msgConfirm("The %s menu is empty.", top->name);
+ restorescr(w);
return DITEM_LEAVE_MENU;
}
@@ -491,14 +493,14 @@ index_menu(PkgNodePtr top, PkgNodePtr plist, int *pos, int *scroll)
pos = scroll = 0;
index_menu(menu, plist, &pos, &scroll);
}
- else {
+ else
msgConfirm("Search string: %s yielded no hits.", cp);
- }
}
continue;
}
dialog_clear();
items_free(nitems, &curr, &max);
+ restorescr(w);
return rval ? DITEM_FAILURE : DITEM_SUCCESS;
}
}
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 8a55b08..0c712e1 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.82 1996/04/07 03:52:25 jkh Exp $
+ * $Id: install.c,v 1.83 1996/04/13 13:31:41 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -79,7 +79,6 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev)
if (c2->type == part && c2->subtype != FS_SWAP && c2->private_data) {
if (c2->flags & CHUNK_IS_ROOT) {
if (rootdev) {
- dialog_clear();
msgConfirm("WARNING: You have more than one root device set?!\n"
"Using the first one found.");
continue;
@@ -90,7 +89,6 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev)
}
else if (!strcmp(((PartInfo *)c2->private_data)->mountpoint, "/usr")) {
if (usrdev) {
- dialog_clear();
msgConfirm("WARNING: You have more than one /usr filesystem.\n"
"Using the first one found.");
continue;
@@ -130,7 +128,6 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev)
*rdev = rootdev;
if (!rootdev) {
- dialog_clear();
msgConfirm("No root device found - you must label a partition as /\n"
"in the label editor.");
status = FALSE;
@@ -138,7 +135,6 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev)
*sdev = swapdev;
if (!swapdev) {
- dialog_clear();
msgConfirm("No swap devices found - you must create at least one\n"
"swap partition.");
status = FALSE;
@@ -146,7 +142,6 @@ checkLabels(Chunk **rdev, Chunk **sdev, Chunk **udev)
*udev = usrdev;
if (!usrdev) {
- dialog_clear();
msgConfirm("WARNING: No /usr filesystem found. This is not technically\n"
"an error if your root filesystem is big enough (or you later\n"
"intend to mount your /usr filesystem over NFS), but it may otherwise\n"
@@ -164,7 +159,6 @@ installInitial(void)
return DITEM_SUCCESS;
if (!variable_get(DISK_LABELLED)) {
- dialog_clear();
msgConfirm("You need to assign disk labels before you can proceed with\nthe installation.");
return DITEM_FAILURE;
}
@@ -173,7 +167,6 @@ installInitial(void)
variable_set2(DISK_PARTITIONED, "yes");
/* If we refuse to proceed, bail. */
- dialog_clear();
if (msgYesNo("Last Chance! Are you SURE you want continue the installation?\n\n"
"If you're running this on a disk with data you wish to save\n"
"then WE STRONGLY ENCOURAGE YOU TO MAKE PROPER BACKUPS before\n"
@@ -182,20 +175,17 @@ installInitial(void)
return DITEM_FAILURE;
if (diskLabelCommit(NULL) != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("Couldn't make filesystems properly. Aborting.");
return DITEM_FAILURE;
}
if (!copySelf()) {
- dialog_clear();
msgConfirm("Couldn't clone the boot floppy onto the root file system.\n"
"Aborting.");
return DITEM_FAILURE;
}
if (chroot("/mnt") == -1) {
- dialog_clear();
msgConfirm("Unable to chroot to /mnt - this is bad!");
return DITEM_FAILURE;
}
@@ -203,7 +193,6 @@ installInitial(void)
chdir("/");
variable_set2(RUNNING_ON_ROOT, "yes");
- dialog_clear();
/* stick a helpful shell over on the 4th VTY */
systemCreateHoloshell();
@@ -230,11 +219,9 @@ installFixitFloppy(dialogMenuItem *self)
Mkdir("/mnt2", NULL);
while (1) {
- dialog_clear();
msgConfirm("Please insert a writable fixit floppy and press return");
if (mount(MOUNT_UFS, "/mnt2", 0, (caddr_t)&args) != -1)
break;
- dialog_clear();
if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?"))
return DITEM_FAILURE;
}
@@ -246,23 +233,16 @@ installFixitFloppy(dialogMenuItem *self)
(void)symlink("/mnt2/tmp", "/tmp");
if (!directory_exists("/var/tmp/vi.recover")) {
if (Mkdir("/var/tmp/vi.recover", NULL) != DITEM_SUCCESS) {
- dialog_clear();
msgConfirm("Warning: Was unable to create a /var/tmp/vi.recover directory.\n"
"vi will kvetch and moan about it as a result but should still\n"
"be essentially usable.");
}
}
/* Link the spwd.db file */
- if (Mkdir("/etc", NULL) != DITEM_SUCCESS) {
- dialog_clear();
+ if (Mkdir("/etc", NULL) != DITEM_SUCCESS)
msgConfirm("Unable to create an /etc directory! Things are weird on this floppy..");
- }
- else {
- if (symlink("/mnt2/etc/spwd.db", "/etc/spwd.db") == -1) {
- dialog_clear();
- msgConfirm("Couldn't symlink the /etc/spwd.db file! I'm not sure I like this..");
- }
- }
+ else if (symlink("/mnt2/etc/spwd.db", "/etc/spwd.db") == -1)
+ msgConfirm("Couldn't symlink the /etc/spwd.db file! I'm not sure I like this..");
if (!file_readable(TERMCAP_FILE))
create_termcap();
if (!(child = fork())) {
@@ -291,7 +271,6 @@ installFixitFloppy(dialogMenuItem *self)
dialog_clear();
dialog_update();
unmount("/mnt2", MNT_FORCE);
- dialog_clear();
msgConfirm("Please remove the fixit floppy now.");
return DITEM_SUCCESS;
}
@@ -327,7 +306,6 @@ int
installNovice(dialogMenuItem *self)
{
variable_set2(SYSTEM_STATE, "novice");
- dialog_clear();
msgConfirm("In the next menu, you will need to set up a DOS-style (\"fdisk\") partitioning\n"
"scheme for your hard disk. If you simply wish to devote all disk space\n"
"to FreeBSD (overwritting anything else that might be on the disk(s) selected)\n"
@@ -338,7 +316,6 @@ installNovice(dialogMenuItem *self)
if (diskPartitionEditor(self) == DITEM_FAILURE)
return DITEM_FAILURE;
- dialog_clear();
msgConfirm("Next, you need to create BSD partitions inside of the fdisk partition(s)\n"
"just created. If you have a reasonable amount of disk space (200MB or more)\n"
"and don't have any special requirements, simply use the (A)uto command to\n"
@@ -349,7 +326,6 @@ installNovice(dialogMenuItem *self)
if (diskLabelEditor(self) == DITEM_FAILURE)
return DITEM_FAILURE;
- dialog_clear();
msgConfirm("Now it is time to select an installation subset. There are a number of\n"
"canned distribution sets, ranging from minimal installation sets to full\n"
"X11 developer oriented configurations. You can also select a custom set\n"
@@ -363,7 +339,6 @@ installNovice(dialogMenuItem *self)
}
if (!mediaDevice) {
- dialog_clear();
msgConfirm("Finally, you must specify an installation medium.");
if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
return DITEM_FAILURE;
@@ -401,7 +376,6 @@ installCommit(dialogMenuItem *self)
if (configFstab() == DITEM_FAILURE)
return DITEM_FAILURE;
if (!rootExtract()) {
- dialog_clear();
msgConfirm("Failed to load the ROOT distribution. Please correct\n"
"this problem and try again.");
return DITEM_FAILURE;
@@ -415,13 +389,11 @@ installCommit(dialogMenuItem *self)
i = DITEM_FAILURE;
if (i != DITEM_FAILURE && !strcmp(str, "novice")) {
- dialog_clear();
msgConfirm("Since you're running the novice installation, a few post-configuration\n"
"questions will be asked at this point. For any option you do not wish\n"
"to configure, select Cancel.");
if (mediaDevice->type != DEVICE_TYPE_FTP && mediaDevice->type != DEVICE_TYPE_NFS) {
- dialog_clear();
if (!msgYesNo("Would you like to configure this machine's network interfaces?")) {
Device *save = mediaDevice;
@@ -431,53 +403,47 @@ installCommit(dialogMenuItem *self)
}
}
- dialog_clear();
if (!msgYesNo("Would you like to configure Samba for connecting NETBUI clients to this\n"
"machine? Windows 95, Windows NT and Windows for Workgroups\n"
"machines can use NETBUI transport for disk and printer sharing."))
configSamba(self);
- dialog_clear();
if (!msgYesNo("Will this machine be an IP gateway (e.g. will it forward packets\n"
"between interfaces)?"))
variable_set2("gateway", "YES");
- dialog_clear();
if (!msgYesNo("Do you want to allow anonymous FTP connections to this machine?"))
configAnonFTP(self);
- dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS server?"))
configNFSServer(self);
- dialog_clear();
if (!msgYesNo("Do you want to configure this machine as an NFS client?"))
variable_set2("nfs_client", "YES");
- dialog_clear();
if (!msgYesNo("Do you want to configure this machine as a WEB server?"))
configApache(self);
- dialog_clear();
if (!msgYesNo("Would you like to customize your system console settings?"))
dmenuOpenSimple(&MenuSyscons);
- dialog_clear();
- if (!msgYesNo("Would you like to set this machine's time zone now?"))
+ if (!msgYesNo("Would you like to set this machine's time zone now?")) {
+ WINDOW *w = savescr();
+
+ dialog_clear();
systemExecute("rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup");
+ restorescr(w);
+ }
- dialog_clear();
if (!msgYesNo("Does this system have a mouse attached to it?"))
dmenuOpenSimple(&MenuMouse);
if (directory_exists("/usr/X11R6")) {
- dialog_clear();
if (!msgYesNo("Would you like to configure your X server at this time?"))
- systemExecute("/usr/X11R6/bin/xf86config");
+ configXFree86(self);
}
if (cdromMounted) {
- dialog_clear();
if (!msgYesNo("Would you like to link to the ports tree on your CDROM?\n\n"
"This will require that you have your FreeBSD CD in the CDROM\n"
"drive to use the ports collection, but at a substantial savings\n"
@@ -486,7 +452,6 @@ installCommit(dialogMenuItem *self)
configPorts(self);
}
- dialog_clear();
if (!msgYesNo("The FreeBSD package collection is a collection of over 300 ready-to-run\n"
"applications, from text editors to games to WEB servers. Would you like\n"
"to browse the collection now?"))
@@ -497,7 +462,6 @@ installCommit(dialogMenuItem *self)
}
/* Final menu of last resort */
- dialog_clear();
if (!msgYesNo("Would you like to go to the general configuration menu for a chance to set\n"
"any last configuration options?"))
dmenuOpenSimple(&MenuConfigure);
@@ -508,22 +472,17 @@ installCommit(dialogMenuItem *self)
/* Don't print this if we're express or novice installing */
if (strcmp(str, "express") && strcmp(str, "novice")) {
- if (Dists || i == DITEM_FAILURE) {
- dialog_clear();
+ if (Dists || i == DITEM_FAILURE)
msgConfirm("Installation completed with some errors. You may wish to\n"
"scroll through the debugging messages on VTY1 with the\n"
"scroll-lock feature.");
- }
- else {
- dialog_clear();
+ else
msgConfirm("Installation completed successfully.\n\n"
"If you have any network devices you have not yet configured,\n"
"see the Interfaces configuration item on the Configuration menu.");
- }
}
else if (!strcmp(str, "novice")) {
if (Dists || i == DITEM_FAILURE) {
- dialog_clear();
msgConfirm("Installation completed with some errors. You may wish to\n"
"scroll through the debugging messages on VTY1 with the\n"
"scroll-lock feature. You can also chose \"No\" at the next\n"
@@ -531,7 +490,6 @@ installCommit(dialogMenuItem *self)
"whichever operations have failed.");
}
else {
- dialog_clear();
msgConfirm("Congradulations! You now have FreeBSD installed on your system.\n"
"At this stage, there shouldn't be much left to do from this\n"
"installation utility so if you wish to come up from the hard disk\n"
@@ -554,13 +512,11 @@ installFixup(dialogMenuItem *self)
if (!file_readable("/kernel")) {
if (file_readable("/kernel.GENERIC")) {
if (vsystem("cp -p /kernel.GENERIC /kernel")) {
- dialog_clear();
msgConfirm("Unable to link /kernel into place!");
return DITEM_FAILURE;
}
}
else {
- dialog_clear();
msgConfirm("Can't find a kernel image to link to on the root file system!\n"
"You're going to have a hard time getting this system to\n"
"boot from the hard disk, I'm afraid!");
@@ -571,7 +527,6 @@ installFixup(dialogMenuItem *self)
if (RunningAsInit) {
msgNotify("Remaking all devices.. Please wait!");
if (vsystem("cd /dev; sh MAKEDEV all")) {
- dialog_clear();
msgConfirm("MAKEDEV returned non-zero status");
return DITEM_FAILURE;
}
@@ -594,7 +549,6 @@ installFixup(dialogMenuItem *self)
if (c1->type == freebsd) {
msgNotify("Making slice entries for %s", c1->name);
if (vsystem("cd /dev; sh MAKEDEV %sh", c1->name)) {
- dialog_clear();
msgConfirm("Unable to make slice entries for %s!", c1->name);
return DITEM_FAILURE;
}
@@ -649,7 +603,6 @@ installFilesystems(dialogMenuItem *self)
/* As the very first thing, try to get ourselves some swap space */
sprintf(dname, "/dev/%s", swapdev->name);
if (!MakeDevChunk(swapdev, "/dev") || !file_readable(dname)) {
- dialog_clear();
msgConfirm("Unable to make device node for %s in /dev!\n"
"The creation of filesystems will be aborted.", dname);
return DITEM_FAILURE;
@@ -664,16 +617,13 @@ installFilesystems(dialogMenuItem *self)
/* Next, create and/or mount the root device */
sprintf(dname, "/dev/r%sa", rootdev->disk->name);
if (!MakeDevChunk(rootdev, "/dev") || !file_readable(dname)) {
- dialog_clear();
msgConfirm("Unable to make device node for %s in /dev!\n"
"The creation of filesystems will be aborted.", dname);
return DITEM_FAILURE;
}
- if (strcmp(root->mountpoint, "/")) {
- dialog_clear();
+ if (strcmp(root->mountpoint, "/"))
msgConfirm("Warning: %s is marked as a root partition but is mounted on %s", rootdev->name, root->mountpoint);
- }
if (root->newfs) {
int i;
@@ -681,7 +631,6 @@ installFilesystems(dialogMenuItem *self)
msgNotify("Making a new root filesystem on %s", dname);
i = vsystem("%s %s", root->newfs_cmd, dname);
if (i) {
- dialog_clear();
msgConfirm("Unable to make new root filesystem on %s!\n"
"Command returned status %d", dname, i);
return DITEM_FAILURE;
@@ -689,22 +638,18 @@ installFilesystems(dialogMenuItem *self)
}
else {
if (!upgrade) {
- dialog_clear();
msgConfirm("Warning: Root device is selected read-only. It will be assumed\n"
"that you have the appropriate device entries already in /dev.");
}
msgNotify("Checking integrity of existing %s filesystem.", dname);
i = vsystem("fsck -y %s", dname);
- if (i) {
- dialog_clear();
+ if (i)
msgConfirm("Warning: fsck returned status of %d for %s.\n"
"This partition may be unsafe to use.", i, dname);
- }
}
/* Switch to block device */
sprintf(dname, "/dev/%sa", rootdev->disk->name);
if (Mount("/mnt", dname)) {
- dialog_clear();
msgConfirm("Unable to mount the root file system on %s! Giving up.", dname);
return DITEM_FAILURE;
}
@@ -717,7 +662,6 @@ installFilesystems(dialogMenuItem *self)
disk = (Disk *)devs[i]->private;
if (!disk->chunks) {
- dialog_clear();
msgConfirm("No chunk list found for %s!", disk->name);
return DITEM_FAILURE;
}
@@ -752,10 +696,8 @@ installFilesystems(dialogMenuItem *self)
i = swapon(fname);
if (!i)
msgNotify("Added %s as an additional swap device", fname);
- else {
- dialog_clear();
+ else
msgConfirm("Unable to add %s as a swap device: %s", fname, strerror(errno));
- }
}
}
}
@@ -771,7 +713,6 @@ installFilesystems(dialogMenuItem *self)
msgNotify("Copying initial device files..");
/* Copy the boot floppy's dev files */
if ((root->newfs || upgrade) && vsystem("find -x /dev | cpio -pdumv /mnt")) {
- dialog_clear();
msgConfirm("Couldn't clone the /dev files!");
return DITEM_FAILURE;
}
@@ -813,14 +754,12 @@ copySelf(void)
msgWeHaveOutput("Copying the boot floppy to /stand on root filesystem");
i = vsystem("find -x /stand | cpio -pdumv /mnt");
if (i) {
- dialog_clear();
msgConfirm("Copy returned error status of %d!", i);
return FALSE;
}
/* Copy the /etc files into their rightful place */
if (vsystem("cd /mnt/stand; find etc | cpio -pdumv /mnt")) {
- dialog_clear();
msgConfirm("Couldn't copy up the /etc files!");
return TRUE;
}
@@ -852,7 +791,6 @@ rootExtract(void)
break;
fd = mediaDevice->get(mediaDevice, "floppies/root.flp", FALSE);
if (fd < 0) {
- dialog_clear();
msgConfirm("Couldn't get root image from %s!\n"
"Will try to get it from floppy.", mediaDevice->name);
mediaDevice->shutdown(mediaDevice);
@@ -904,7 +842,6 @@ create_termcap(void)
Mkdir("/usr/share/misc", NULL);
fp = fopen(TERMCAP_FILE, "w");
if (!fp) {
- dialog_clear();
msgConfirm("Unable to initialize termcap file. Some screen-oriented\nutilities may not work.");
return;
}
diff --git a/release/sysinstall/installFinal.c b/release/sysinstall/installFinal.c
index 336bab9..39370b6 100644
--- a/release/sysinstall/installFinal.c
+++ b/release/sysinstall/installFinal.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: installFinal.c,v 1.25 1996/04/07 03:52:26 jkh Exp $
+ * $Id: installFinal.c,v 1.26 1996/04/13 13:31:42 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard & Coranth Gryphon. All rights reserved.
@@ -163,26 +163,20 @@ configSamba(dialogMenuItem *self)
else
fprintf(fptr, "read only = yes\n\n");
}
- else {
- dialog_clear();
+ else
msgConfirm("Invalid Share Name.");
- }
}
- else {
- dialog_clear();
+ else
msgConfirm("Directory does not exist.");
- }
} /* end if (tptr) */
} /* end for loop */
} /* end if (SAMBA_export) */
fclose(fptr);
vsystem("mv -f /tmp/smb.conf %s", SMB_CONF);
}
- else {
- dialog_clear();
+ else
msgConfirm("Unable to open temporary smb.conf file.\n"
"Samba will have to be configured by hand.");
- }
}
return i;
}
@@ -194,7 +188,8 @@ configNFSServer(dialogMenuItem *self)
/* If we're an NFS server, we need an exports file */
if (!file_readable("/etc/exports")) {
- dialog_clear();
+ WINDOW *w = savescr();
+
msgConfirm("Operating as an NFS server means that you must first configure\n"
"an /etc/exports file to indicate which hosts are allowed certain\n"
"kinds of access to your local file systems.\n"
@@ -208,9 +203,10 @@ configNFSServer(dialogMenuItem *self)
vsystem("echo '#' >> /etc/exports");
vsystem("echo '# You should replace these lines with your actual exported filesystems.' >> /etc/exports");
vsystem("echo >> /etc/exports");
- dialog_clear();
sprintf(cmd, "%s /etc/exports", variable_get(VAR_EDITOR));
+ dialog_clear();
systemExecute(cmd);
+ restorescr(w);
}
variable_set2("nfs_server", "YES");
return DITEM_SUCCESS;
diff --git a/release/sysinstall/installUpgrade.c b/release/sysinstall/installUpgrade.c
index 2d0c3cc..aa06e72 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.19 1996/04/07 03:52:29 jkh Exp $
+ * $Id: installUpgrade.c,v 1.20 1996/04/13 13:31:43 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -56,7 +56,6 @@ typedef struct _hitList {
static void
doByHand(HitList *h)
{
- dialog_clear();
msgConfirm("/etc/%s is one of those files that this upgrade procedure just isn't\n"
"smart enough to deal with right now. You'll need to merge the old and\n"
"new versions by hand when the option to do so manually is later\n"
@@ -68,7 +67,6 @@ doByHand(HitList *h)
static void
yellSysconfig(HitList *h)
{
- dialog_clear();
msgConfirm("/etc/sysconfig is one of those files that this upgrade procedure just isn't\n"
"smart enough to deal with right now. Unfortunately, your system\n"
"will also come up with a very different \"personality\" than it had\n"
@@ -151,11 +149,9 @@ traverseHitlist(HitList *h)
{
while (h->name) {
if (!file_readable(h->name)) {
- if (!h->optional) {
- dialog_clear();
+ if (!h->optional)
msgConfirm("Unable to find an old /etc/%s file! That is decidedly non-standard and\n"
"your upgraded system may function a little strangely as a result.");
- }
}
else {
if (h->action == JUST_COPY) {
@@ -165,10 +161,8 @@ traverseHitlist(HitList *h)
/* Copy the old one into its place */
msgNotify("Resurrecting %s..", h->name);
/* Do this with tar so that symlinks and such are preserved */
- if (vsystem("tar cf - %s | tar xpf - -C /etc", h->name)) {
- dialog_clear();
+ if (vsystem("tar cf - %s | tar xpf - -C /etc", h->name))
msgConfirm("Unable to resurrect your old /etc/%s! Hmmmm.", h->name);
- }
}
else /* call handler */
h->handler(h);
@@ -185,7 +179,6 @@ installUpgrade(dialogMenuItem *self)
struct termios foo;
if (!RunningAsInit) {
- dialog_clear();
msgConfirm("You can only perform this procedure when booted off the installation\n"
"floppy.");
return DITEM_FAILURE;
@@ -199,7 +192,6 @@ installUpgrade(dialogMenuItem *self)
return DITEM_FAILURE;
if (!Dists) {
- dialog_clear();
msgConfirm("You haven't specified any distributions yet. The upgrade procedure will\n"
"only upgrade those portions of the system for which a distribution has\n"
"been selected. In the next screen, we'll go to the Distributions menu\n"
@@ -211,7 +203,6 @@ installUpgrade(dialogMenuItem *self)
/* No bin selected? Not much of an upgrade.. */
if (!(Dists & DIST_BIN)) {
- dialog_clear();
if (msgYesNo("You didn't select the bin distribution as one of the distributons to load.\n"
"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"
@@ -225,13 +216,11 @@ installUpgrade(dialogMenuItem *self)
extractingBin = FALSE;
if (!mediaDevice) {
- dialog_clear();
msgConfirm("Now you must specify an installation medium for the upgrade.");
if (!dmenuOpenSimple(&MenuMedia) || !mediaDevice)
return DITEM_FAILURE;
}
- dialog_clear();
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 editor\n"
@@ -242,7 +231,6 @@ installUpgrade(dialogMenuItem *self)
"step.");
if (diskLabelEditor(self) == DITEM_FAILURE) {
- dialog_clear();
msgConfirm("The disk label editor failed to work properly! Upgrade operation\n"
"aborted.");
return DITEM_FAILURE;
@@ -251,7 +239,6 @@ installUpgrade(dialogMenuItem *self)
/* Don't write out MBR info */
variable_set2(DISK_PARTITIONED, "written");
if (diskLabelCommit(self) == DITEM_FAILURE) {
- dialog_clear();
msgConfirm("Not all file systems were properly mounted. Upgrade operation\n"
"aborted.");
variable_unset(DISK_PARTITIONED);
@@ -259,14 +246,12 @@ installUpgrade(dialogMenuItem *self)
}
if (!copySelf()) {
- dialog_clear();
msgConfirm("Couldn't clone the boot floppy onto the root file system.\n"
"Aborting.");
return DITEM_FAILURE;
}
if (chroot("/mnt") == DITEM_FAILURE) {
- dialog_clear();
msgConfirm("Unable to chroot to /mnt - something is wrong with the\n"
"root partition or the way it's mounted if this doesn't work.");
variable_unset(DISK_PARTITIONED);
@@ -277,7 +262,6 @@ installUpgrade(dialogMenuItem *self)
systemCreateHoloshell();
if (!rootExtract()) {
- dialog_clear();
msgConfirm("Failed to load the ROOT distribution. Please correct\n"
"this problem and try again (the system will now reboot).");
reboot(0);
@@ -287,7 +271,6 @@ installUpgrade(dialogMenuItem *self)
while (!saved_etc) {
saved_etc = msgGetInput("/usr/tmp/etc", "Under which directory do you wish to save your current /etc?");
if (!saved_etc || !*saved_etc || Mkdir(saved_etc, NULL)) {
- dialog_clear();
if (msgYesNo("Directory was not specified, was invalid or user selected Cancel.\n\n"
"Doing an upgrade without first backing up your /etc directory is a very\n"
"bad idea! Do you want to go back and specify the save directory again?"))
@@ -303,7 +286,6 @@ installUpgrade(dialogMenuItem *self)
if (file_readable("/kernel")) {
msgNotify("Moving old kernel to /kernel.205");
if (system("chflags noschg /kernel && mv /kernel /kernel.205")) {
- dialog_clear();
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? Due to the\n"
"way that this upgrade process works, you will have to reboot\n"
@@ -317,13 +299,12 @@ installUpgrade(dialogMenuItem *self)
msgNotify("Beginning extraction of distributions..");
if (distExtractAll(self) == DITEM_FAILURE) {
if (extractingBin && (Dists & DIST_BIN)) {
- dialog_clear();
msgConfirm("Hmmmm. We couldn't even extract the bin distribution. This upgrade\n"
"should be considered a failure and started from the beginning, sorry!\n"
"The system will reboot now.");
+ dialog_clear();
reboot(0);
}
- dialog_clear();
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"
"only non-essential distributions which failed to load.");
@@ -335,20 +316,17 @@ installUpgrade(dialogMenuItem *self)
"few \"fixup\" operations to repair the effects of splatting a bin distribution\n"
"on top of an existing system..");
if (installFixup(self) == DITEM_FAILURE) {
- dialog_clear();
msgConfirm("Hmmmmm. The fixups don't seem to have been very happy.\n"
"You may wish to examine the system a little more closely when\n"
"it comes time to merge your /etc customizations back.");
}
}
- dialog_clear();
msgConfirm("First stage of upgrade completed successfully!\n\n"
"Next comes stage 2, where we attempt to resurrect your /etc\n"
"directory!");
if (chdir(saved_etc)) {
- dialog_clear();
msgConfirm("Unable to go to your saved /etc directory in %s?! Argh!\n"
"Something went seriously wrong! It's quite possible that\n"
"your former /etc is toast. I hope you didn't have any\n"
@@ -359,7 +337,6 @@ installUpgrade(dialogMenuItem *self)
traverseHitlist(etc_files);
}
- dialog_clear();
msgConfirm("OK! At this stage, we've resurrected all the /etc files we could\n"
"(and you may have been warned about some that you'll have to merge\n"
"yourself by hand) and we're going to drop you into a shell to do\n"
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index 7b930c7..c924084 100644
--- a/release/sysinstall/label.c
+++ b/release/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.41 1996/04/07 03:52:30 jkh Exp $
+ * $Id: label.c,v 1.42 1996/04/13 13:31:45 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -86,7 +86,6 @@ diskLabelEditor(dialogMenuItem *self)
devs = deviceFind(cp, DEVICE_TYPE_DISK);
cnt = deviceCount(devs);
if (!cnt) {
- dialog_clear();
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.");
@@ -119,7 +118,6 @@ diskLabelCommit(dialogMenuItem *self)
i = DITEM_SUCCESS;
}
else if (!cp) {
- dialog_clear();
msgConfirm("You must assign disk labels before this option can be used.");
i = DITEM_FAILURE;
}
@@ -465,10 +463,10 @@ diskLabel(char *str)
PartInfo *p, *oldp;
PartType type;
Device **devs;
+ WINDOW *w;
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
- dialog_clear();
msgConfirm("No disks found!");
return DITEM_FAILURE;
}
@@ -477,6 +475,7 @@ diskLabel(char *str)
keypad(stdscr, TRUE);
record_label_chunks(devs);
+ w = savescr();
dialog_clear(); clear();
while (labeling) {
clear();
@@ -540,7 +539,6 @@ diskLabel(char *str)
if (label_chunk_info[i++].type != PART_SLICE)
cnt++;
if (cnt == (CHUNK_COLUMN_MAX * 2) + 4) {
- dialog_clear();
msgConfirm("Sorry, I can't fit any more partitions on the screen! You can get around\n"
"this limitation by partitioning your disks individually rather than all\n"
"at once. This will be fixed just as soon as we get a scrolling partition\n"
@@ -567,7 +565,6 @@ diskLabel(char *str)
CHUNK_IS_ROOT);
if (!tmp) {
- dialog_clear();
msgConfirm("Unable to create the root partition. Too big?");
break;
}
@@ -590,7 +587,6 @@ diskLabel(char *str)
swsize,
part, FS_SWAP, 0);
if (!tmp) {
- dialog_clear();
msgConfirm("Unable to create the swap partition. Too big?");
break;
}
@@ -604,7 +600,6 @@ diskLabel(char *str)
label_chunk_info[here].c,
(cp ? atoi(cp) : VAR_MIN_SIZE) * ONE_MEG, part, FS_BSDFFS, 0);
if (!tmp) {
- dialog_clear();
msgConfirm("Less than %dMB free for /var - you will need to\n"
"partition your disk manually with a custom install!", (cp ? atoi(cp) : VAR_MIN_SIZE));
break;
@@ -619,7 +614,6 @@ diskLabel(char *str)
else
sz = space_free(label_chunk_info[here].c);
if (!sz || sz < (USR_MIN_SIZE * ONE_MEG)) {
- dialog_clear();
msgConfirm("Less than %dMB free for /usr - you will need to\n"
"partition your disk manually with a custom install!", USR_MIN_SIZE);
break;
@@ -629,7 +623,6 @@ diskLabel(char *str)
label_chunk_info[here].c,
sz, part, FS_BSDFFS, 0);
if (!tmp) {
- dialog_clear();
msgConfirm("Unable to create the /usr partition. Not enough space?\n"
"You will need to partition your disk manually with a custom install!");
break;
@@ -640,7 +633,7 @@ diskLabel(char *str)
tmp->private_free = safe_free;
record_label_chunks(devs);
}
- break;
+ break;
case 'C':
if (label_chunk_info[here].type != PART_SLICE) {
@@ -655,7 +648,6 @@ diskLabel(char *str)
if (label_chunk_info[i++].type != PART_SLICE)
cnt++;
if (cnt == (CHUNK_COLUMN_MAX * 2)) {
- dialog_clear();
msgConfirm("Sorry, I can't fit any more partitions on the screen! You can get around\n"
"this limitation by partitioning your disks individually rather than all\n"
"at once. This will be fixed just as soon as we get a scrolling partition\n"
@@ -742,9 +734,9 @@ diskLabel(char *str)
tmp->private_data = new_part(p->mountpoint, p->newfs, tmp->size);
tmp->private_free = safe_free;
safe_free(p);
- } else {
- tmp->private_data = p;
}
+ else
+ tmp->private_data = p;
tmp->private_free = safe_free;
variable_set2(DISK_LABELLED, "yes");
record_label_chunks(devs);
@@ -811,7 +803,8 @@ diskLabel(char *str)
case 'T': /* Toggle newfs state */
if (label_chunk_info[here].type == PART_FILESYSTEM) {
PartInfo *pi = ((PartInfo *)label_chunk_info[here].c->private_data);
- label_chunk_info[here].c->private_data = new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
+ label_chunk_info[here].c->private_data =
+ new_part(pi ? pi->mountpoint : NULL, pi ? !pi->newfs : TRUE, label_chunk_info[here].c->size);
safe_free(pi);
label_chunk_info[here].c->private_free = safe_free;
variable_set2(DISK_LABELLED, "yes");
@@ -864,7 +857,6 @@ diskLabel(char *str)
DialogActive = FALSE;
devs = deviceFind(NULL, DEVICE_TYPE_DISK);
if (!devs) {
- dialog_clear();
msgConfirm("Can't find any disk devices!");
break;
}
@@ -891,6 +883,6 @@ diskLabel(char *str)
break;
}
}
- dialog_clear();
+ restorescr(w);
return DITEM_SUCCESS;
}
diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c
index ad96f05..9ac9eb9 100644
--- a/release/sysinstall/media.c
+++ b/release/sysinstall/media.c
@@ -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: media.c,v 1.31 1996/04/07 03:52:32 jkh Exp $
+ * $Id: media.c,v 1.32 1996/04/13 13:31:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -83,7 +83,6 @@ mediaSetCDROM(dialogMenuItem *self)
devs = deviceFind(NULL, DEVICE_TYPE_CDROM);
cnt = deviceCount(devs);
if (!cnt) {
- dialog_clear();
msgConfirm("No CDROM devices found! Please check that your system's\n"
"configuration is correct and that the CDROM drive is of a supported\n"
"type. For more information, consult the hardware guide\n"
@@ -126,7 +125,6 @@ mediaSetFloppy(dialogMenuItem *self)
devs = deviceFind(NULL, DEVICE_TYPE_FLOPPY);
cnt = deviceCount(devs);
if (!cnt) {
- dialog_clear();
msgConfirm("No floppy devices found! Please check that your system's configuration\n"
"is correct. For more information, consult the hardware guide in the Doc\n"
"menu.");
@@ -168,7 +166,6 @@ mediaSetDOS(dialogMenuItem *self)
devs = deviceFind(NULL, DEVICE_TYPE_DOS);
cnt = deviceCount(devs);
if (!cnt) {
- dialog_clear();
msgConfirm("No DOS primary partitions found! This installation method is unavailable");
return DITEM_FAILURE;
}
@@ -208,7 +205,6 @@ mediaSetTape(dialogMenuItem *self)
devs = deviceFind(NULL, DEVICE_TYPE_TAPE);
cnt = deviceCount(devs);
if (!cnt) {
- dialog_clear();
msgConfirm("No tape drive devices found! Please check that your system's configuration\n"
"is correct. For more information, consult the hardware guide in the Doc\n"
"menu.");
@@ -254,14 +250,11 @@ mediaSetFTP(dialogMenuItem *self)
static Device ftpDevice;
char *cp;
- if (!(cp = variable_get(VAR_FTP_PATH))) {
- if (!dmenuOpenSimple(&MenuMediaFTP))
- return DITEM_FAILURE;
- else
- cp = variable_get(VAR_FTP_PATH);
- }
+ if (!dmenuOpenSimple(&MenuMediaFTP))
+ return DITEM_FAILURE;
+ else
+ cp = variable_get(VAR_FTP_PATH);
if (!cp) {
- dialog_clear();
msgConfirm("%s not set! Not setting an FTP installation path, OK?", VAR_FTP_PATH);
return DITEM_FAILURE;
}
@@ -278,7 +271,6 @@ mediaSetFTP(dialogMenuItem *self)
return DITEM_FAILURE;
}
if (strncmp("ftp://", cp, 6)) {
- dialog_clear();
msgConfirm("Sorry, %s is an invalid URL!", cp);
return DITEM_FAILURE;
}
@@ -315,21 +307,19 @@ int
mediaSetUFS(dialogMenuItem *self)
{
static Device ufsDevice;
- char *val;
+ char *cp;
- if (!(val = variable_get(VAR_UFS_PATH))) {
- val = variable_get_value(VAR_UFS_PATH, "Enter a fully qualified pathname for the directory\n"
- "containing the FreeBSD distribution files:");
- if (!val)
- return DITEM_FAILURE;
- }
+ cp = variable_get_value(VAR_UFS_PATH, "Enter a fully qualified pathname for the directory\n"
+ "containing the FreeBSD distribution files:");
+ if (!cp)
+ return DITEM_FAILURE;
strcpy(ufsDevice.name, "ufs");
ufsDevice.type = DEVICE_TYPE_UFS;
ufsDevice.init = dummyInit;
ufsDevice.get = mediaGetUFS;
ufsDevice.close = dummyClose;
ufsDevice.shutdown = dummyShutdown;
- ufsDevice.private = strdup(val);
+ ufsDevice.private = strdup(cp);
mediaDevice = &ufsDevice;
return DITEM_LEAVE_MENU;
}
@@ -422,14 +412,12 @@ mediaExtractDistEnd(int zpid, int cpid)
i = waitpid(zpid, &j, 0);
if (i < 0) { /* Don't check status - gunzip seems to return a bogus one! */
- dialog_clear();
if (isDebug())
msgDebug("wait for gunzip returned status of %d!\n", i);
return FALSE;
}
i = waitpid(cpid, &j, 0);
if (i < 0 || WEXITSTATUS(j)) {
- dialog_clear();
if (isDebug())
msgDebug("cpio returned error status of %d!\n", WEXITSTATUS(j));
return FALSE;
@@ -488,14 +476,12 @@ mediaExtractDist(char *dir, int fd)
i = waitpid(zpid, &j, 0);
if (i < 0) { /* Don't check status - gunzip seems to return a bogus one! */
- dialog_clear();
if (isDebug())
msgDebug("wait for gunzip returned status of %d!\n", i);
return FALSE;
}
i = waitpid(cpid, &j, 0);
if (i < 0 || WEXITSTATUS(j)) {
- dialog_clear();
if (isDebug())
msgDebug("cpio returned error status of %d!\n", WEXITSTATUS(j));
return FALSE;
@@ -516,7 +502,6 @@ Boolean
mediaVerify(void)
{
if (!mediaDevice) {
- dialog_clear();
msgConfirm("Media type not set! Please select a media type\n"
"from the Installation menu before proceeding.");
return mediaGetType(NULL) == DITEM_SUCCESS;
@@ -531,7 +516,6 @@ mediaSetFtpOnError(dialogMenuItem *self)
char *cp = variable_get(VAR_FTP_ONERROR);
if (!cp) {
- dialog_clear();
msgConfirm("FTP error handling is not set to anything!");
return DITEM_FAILURE;
}
@@ -552,12 +536,10 @@ mediaSetFtpUserPass(dialogMenuItem *self)
{
char *pass;
- dialog_clear();
if (variable_get_value(VAR_FTP_USER, "Please enter the username you wish to login as:"))
pass = variable_get_value(VAR_FTP_PASS, "Please enter the password for this user:");
else
pass = NULL;
- dialog_clear();
return pass ? DITEM_SUCCESS : DITEM_FAILURE;
}
@@ -568,7 +550,6 @@ mediaSetCPIOVerbosity(dialogMenuItem *self)
char *cp = variable_get(VAR_CPIO_VERBOSITY);
if (!cp) {
- dialog_clear();
msgConfirm("CPIO Verbosity is not set to anything!");
return DITEM_FAILURE;
}
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index b50d77b..9ce6905 100644
--- a/release/sysinstall/menus.c
+++ b/release/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.49 1996/04/07 03:52:33 jkh Exp $
+ * $Id: menus.c,v 1.50 1996/04/13 13:31:58 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -53,16 +53,16 @@ first character of the option name you're interested in. Invoke an\n\
option by pressing [ENTER].", /* prompt */
"Press F1 for usage instructions", /* help line */
"usage", /* help file */
-{ { "Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
- { "Doc", "More detailed documentation on FreeBSD", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
- { "Options", "Go to options editor", NULL, optionsEditor },
- { "Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
- { "Express", "Begin a quick installation (for the impatient)", NULL, installExpress },
- { "Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
- { "Fixit", "Go into repair mode with CDROM or floppy", NULL, dmenuSubmenu, NULL, &MenuFixit },
- { "Upgrade", "Upgrade an existing 2.0.5 system", NULL, installUpgrade },
- { "Configure","Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure },
- { "Quit", "Exit this menu (and the installation)", NULL },
+{ { "1 Usage", "Quick start - How to use this menu system", NULL, dmenuDisplayFile, NULL, "usage" },
+ { "2 Doc", "More detailed documentation on FreeBSD", NULL, dmenuSubmenu, NULL, &MenuDocumentation },
+ { "3 Options","Go to options editor", NULL, optionsEditor },
+ { "4 Novice", "Begin a novice installation (for beginners)", NULL, installNovice },
+ { "5 Express","Begin a quick installation (for the impatient)", NULL, installExpress },
+ { "6 Custom", "Begin a custom installation (for experts)", NULL, dmenuSubmenu, NULL, &MenuInstallCustom },
+ { "7 Fixit", "Go into repair mode with CDROM or floppy", NULL, dmenuSubmenu, NULL, &MenuFixit },
+ { "8 Upgrade","Upgrade an existing 2.0.5 system", NULL, installUpgrade },
+ { "9 Configure","Do post-install configuration of FreeBSD", NULL, dmenuSubmenu, NULL, &MenuConfigure },
+ { "0 Exit", "Exit this menu (and the installation)", NULL },
{ NULL } },
};
@@ -78,8 +78,8 @@ floppy has only a minimal subset of commands which we deemed most useful\n\
for fixing a system in trouble.",
"Press F1 for more detailed repair instructions",
"fixit",
-{ { "CDROM", "Use the 2nd \"live\" CDROM from the distribution", NULL, installFixitCDROM },
- { "Floppy", "Use a floppy generated from the fixit image", NULL, installFixitFloppy },
+{ { "1 CDROM", "Use the 2nd \"live\" CDROM from the distribution", NULL, installFixitCDROM },
+ { "2 Floppy", "Use a floppy generated from the fixit image", NULL, installFixitFloppy },
{ NULL } },
};
@@ -95,18 +95,42 @@ a step-by-step tutorial on installing FreeBSD. For general information,\n\
consult the README file.",
"Confused? Press F1 for help.",
"usage",
-{ { "README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "readme" },
- { "Hardware", "The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "hardware" },
- { "Install", "A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "install" },
- { "Copyright","The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
- { "Release", "The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "relnotes" },
- { "HTML Docs","Go to the HTML documentation menu (post-install).", NULL, docBrowser },
- { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+{ { "1 README", "A general description of FreeBSD. Read this!", NULL, dmenuDisplayFile, NULL, "readme" },
+ { "2 Hardware","The FreeBSD survival guide for PC hardware.", NULL, dmenuDisplayFile, NULL, "hardware" },
+ { "3 Install","A step-by-step guide to installing FreeBSD.", NULL, dmenuDisplayFile, NULL, "install" },
+ { "4 Copyright","The FreeBSD Copyright notices.", NULL, dmenuDisplayFile, NULL, "COPYRIGHT" },
+ { "5 Release","The release notes for this version of FreeBSD.", NULL, dmenuDisplayFile, NULL, "relnotes" },
+ { "6 HTML Docs","Go to the HTML documentation menu (post-install).", NULL, docBrowser },
+ { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
+static int
+whichMouse(dialogMenuItem *self)
+{
+ char buf[BUFSIZ];
+
+ if (!file_readable("/dev/mouse"))
+ return FALSE;
+ if (readlink("/dev/mouse", buf, BUFSIZ) == -1)
+ return FALSE;
+ if (!strcmp(self->prompt, "COM1"))
+ return !strcmp(buf, "/dev/cuaa0");
+ else if (!strcmp(self->prompt, "COM2"))
+ return !strcmp(buf, "/dev/cuaa1");
+ if (!strcmp(self->prompt, "COM3"))
+ return !strcmp(buf, "/dev/cuaa2");
+ if (!strcmp(self->prompt, "COM4"))
+ return !strcmp(buf, "/dev/cuaa3");
+ if (!strcmp(self->prompt, "BusMouse"))
+ return !strcmp(buf, "/dev/msg0");
+ if (!strcmp(self->prompt, "PS/2"))
+ return !strcmp(buf, "/dev/psm0");
+ return FALSE;
+}
+
DMenu MenuMouse = {
- DMENU_NORMAL_TYPE | DMENU_SELECTION_RETURNS,
+ DMENU_RADIO_TYPE,
"Please select your mouse type from the following menu",
"There are many different types of mice currently on the market,\n\
but this configuration menu should at least narrow down the choices\n\
@@ -117,12 +141,18 @@ a kernel recompile is also required! See the handbook for more details\n\
on building a kernel.",
"For more information, visit the Documentation menu",
NULL,
-{ { "COM1", "Serial mouse on COM1", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa0 /dev/mouse" },
- { "COM2", "Serial mouse on COM2", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa1 /dev/mouse" },
- { "COM3", "Serial mouse on COM3", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa2 /dev/mouse" },
- { "COM4", "Serial mouse on COM4", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/cuaa3 /dev/mouse" },
- { "BusMouse", "Logitech or ATI bus mouse", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/mse0 /dev/mouse" },
- { "PS/2", "PS/2 style mouse (requires kernel rebuild)", NULL, dmenuSystemCommand, NULL, "ln -fs /dev/psm0 /dev/mouse" },
+{ { "COM1", "Serial mouse on COM1", whichMouse, dmenuSystemCommand, NULL,
+ "ln -fs /dev/cuaa0 /dev/mouse", '(', '*', ')', 1 },
+ { "COM2", "Serial mouse on COM2", whichMouse, dmenuSystemCommand, NULL,
+ "ln -fs /dev/cuaa1 /dev/mouse", '(', '*', ')', 1 },
+ { "COM3", "Serial mouse on COM3", whichMouse, dmenuSystemCommand, NULL,
+ "ln -fs /dev/cuaa2 /dev/mouse", '(', '*', ')', 1 },
+ { "COM4", "Serial mouse on COM4", whichMouse, dmenuSystemCommand, NULL,
+ "ln -fs /dev/cuaa3 /dev/mouse", '(', '*', ')', 1 },
+ { "BusMouse", "Logitech or ATI bus mouse", whichMouse, dmenuSystemCommand, NULL,
+ "ln -fs /dev/mse0 /dev/mouse", '(', '*', ')', 1 },
+ { "PS/2", "PS/2 style mouse (requires kernel rebuild)", whichMouse, dmenuSystemCommand, NULL,
+ "ln -fs /dev/psm0 /dev/mouse", '(', '*', ')', 1 },
{ NULL } },
};
@@ -317,6 +347,32 @@ for an ethernet installation.",
{ { NULL } },
};
+static int
+whichMedia(dialogMenuItem *self)
+{
+ if (!mediaDevice)
+ return FALSE;
+ if (!strcmp(self->prompt, "1 CDROM") && mediaDevice->type == DEVICE_TYPE_CDROM)
+ return TRUE;
+ else if (!strcmp(self->prompt, "2 DOS") && mediaDevice->type == DEVICE_TYPE_DOS)
+ return TRUE;
+ else if (!strcmp(self->prompt, "3 File System") && mediaDevice->type == DEVICE_TYPE_UFS)
+ return TRUE;
+ else if (!strcmp(self->prompt, "4 Floppy") && mediaDevice->type == DEVICE_TYPE_FLOPPY)
+ return TRUE;
+ else if (!strcmp(self->prompt, "5 FTP") && mediaDevice->type == DEVICE_TYPE_FTP &&
+ !strcmp(variable_get(VAR_FTP_STATE), "active"))
+ return TRUE;
+ else if (!strcmp(self->prompt, "6 FTP Passive") && mediaDevice->type == DEVICE_TYPE_FTP &&
+ !strcmp(variable_get(VAR_FTP_STATE), "passive"))
+ return TRUE;
+ else if (!strcmp(self->prompt, "7 NFS") && mediaDevice->type == DEVICE_TYPE_NFS)
+ return TRUE;
+ else if (!strcmp(self->prompt, "8 Tape") && mediaDevice->type == DEVICE_TYPE_TAPE)
+ return TRUE;
+ return FALSE;
+}
+
/* The media selection menu */
DMenu MenuMedia = {
DMENU_RADIO_TYPE,
@@ -328,14 +384,22 @@ the best media to use if you have no overriding reason for using other\n\
media.",
"Press F1 for more information on the various media types",
"media",
-{ { "CDROM", "Install from a FreeBSD CDROM", NULL, mediaSetCDROM },
- { "DOS", "Install from a DOS partition", NULL, mediaSetDOS },
- { "File System", "Install from an existing filesystem", NULL, mediaSetUFS },
- { "Floppy", "Install from a floppy disk set", NULL, mediaSetFloppy },
- { "FTP", "Install from an FTP server", NULL, mediaSetFTPActive },
- { "FTP Passive", "Install from an FTP server through a firewall", NULL, mediaSetFTPPassive },
- { "NFS", "Install over NFS", NULL, mediaSetNFS },
- { "Tape", "Install from SCSI or QIC tape", NULL, mediaSetTape },
+{ { "1 CDROM", "Install from a FreeBSD CDROM",
+ whichMedia, mediaSetCDROM },
+ { "2 DOS", "Install from a DOS partition",
+ whichMedia, mediaSetDOS },
+ { "3 File System", "Install from an existing filesystem",
+ whichMedia, mediaSetUFS },
+ { "4 Floppy", "Install from a floppy disk set",
+ whichMedia, mediaSetFloppy },
+ { "5 FTP", "Install from an FTP server",
+ whichMedia, mediaSetFTPActive },
+ { "6 FTP Passive", "Install from an FTP server through a firewall",
+ whichMedia, mediaSetFTPPassive },
+ { "7 NFS", "Install over NFS",
+ whichMedia, mediaSetNFS },
+ { "8 Tape", "Install from SCSI or QIC tape",
+ whichMedia, mediaSetTape },
{ NULL } },
};
@@ -347,28 +411,30 @@ DMenu MenuDistributions = {
These select what we consider to be the most reasonable defaults for the\n\
type of system in question. If you would prefer to pick and choose the\n\
list of distributions yourself, simply select \"Custom\". You can also\n\
-add distribution sets together by picking more than one, fine-tuning the\n\
-final results with the Custom item. When you are finished, select Cancel",
+pick a canned distribution set and then fine-tune it with the Custom item.\n\
+When you are finished, select Cancel or chose Exit.",
"Press F1 for more information on these options.",
"distributions",
-{ { "Developer", "Full sources, binaries and doc but no games [180MB]",
+{ { "1 Developer", "Full sources, binaries and doc but no games [180MB]",
NULL, distSetDeveloper },
- { "X-Developer", "Same as above, but includes XFree86 [201MB]",
+ { "2 X-Developer", "Same as above, but includes XFree86 [201MB]",
NULL, distSetXDeveloper },
- { "Kern-Developer", "Full binaries and doc, kernel sources only [70MB]",
+ { "3 Kern-Developer", "Full binaries and doc, kernel sources only [70MB]",
NULL, distSetKernDeveloper },
- { "User", "Average user - binaries and doc but no sources [52MB]",
+ { "4 User", "Average user - binaries and doc but no sources [52MB]",
NULL, distSetUser },
- { "X-User", "Same as above, but includes XFree86 [52MB]",
+ { "5 X-User", "Same as above, but includes XFree86 [52MB]",
NULL, distSetXUser },
- { "Minimal", "The smallest configuration possible [44MB]",
+ { "6 Minimal", "The smallest configuration possible [44MB]",
NULL, distSetMinimum },
- { "Everything", "All sources, binaries and XFree86 binaries [700MB]",
+ { "7 Everything", "All sources, binaries and XFree86 binaries [700MB]",
NULL, distSetEverything },
- { "Custom", "Specify your own distribution set [?]",
+ { "8 Custom", "Specify your own distribution set [?]",
NULL, dmenuSubmenu, NULL, &MenuSubDistributions },
- { "Clear", "Reset selected distribution list to None",
+ { "9 Clear", "Reset selected distribution list to None",
NULL, distReset },
+ { "0 Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel },
{ NULL } },
};
@@ -428,6 +494,10 @@ DES distribution out of the U.S.! It is for U.S. customers only.",
x11FlagCheck, distSetXF86 },
{ "xperimnt", "Experimental work in progress!",
dmenuFlagCheck, dmenuSetFlag, NULL, &Dists, '[', 'X', ']', DIST_EXPERIMENTAL },
+ { "Clear", "Reset selected distribution list to None",
+ NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -449,6 +519,8 @@ software, please consult the release notes.",
dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SEBONES },
{ "ssecure", "Sources for DES [1MB]",
dmenuFlagCheck, dmenuSetFlag, NULL, &DESDists, '[', 'X', ']', DIST_DES_SSECURE },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -491,6 +563,10 @@ you wish to install.",
dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_USBIN },
{ "smailcf", "/usr/src/usr.sbin (sendmail config macros) [341K]",
dmenuFlagCheck, dmenuSetFlag, NULL, &SrcDists, '[', 'X', ']', DIST_SRC_SMAILCF },
+ { "Clear", "Reset selected source distribution list to None",
+ NULL, distSrcReset, NULL, NULL, ' ', ' ', ' ' },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -501,7 +577,15 @@ clearx11(dialogMenuItem *self)
XF86ServerDists = 0;
XF86FontDists = 0;
Dists &= ~DIST_XF86;
- return DITEM_REDRAW;
+ return DITEM_SUCCESS | DITEM_REDRAW;
+}
+
+static int
+clearx11Servers(dialogMenuItem *self)
+{
+ XF86Dists &= ~DIST_XF86_SERVER;
+ XF86ServerDists = 0;
+ return DITEM_SUCCESS | DITEM_REDRAW;
}
static int
@@ -538,7 +622,9 @@ component set and at least one entry from the Server and Font set menus.",
{ "Fonts", "Font set menu",
checkx11Fonts, dmenuSubmenu, NULL, &MenuXF86SelectFonts },
{ "Clear", "Reset XFree86 distribution list",
- NULL, clearx11 },
+ NULL, clearx11, NULL, NULL, ' ', ' ', ' ' },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -575,6 +661,10 @@ Bin, lib, xicf, and xdcf are recommended for a minimum installaion.",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_PEX },
{ "sources", "XFree86 3.1.2-S standard + contrib sources [200MB]",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86Dists, '[', 'X', ']', DIST_XF86_SRC },
+ { "Clear", "Reset XFree86 distribution list",
+ NULL, clearx11, NULL, NULL, ' ', ' ', ' ' },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -599,6 +689,8 @@ install. At the minimum, you should install the standard\n\
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_NON },
{ "server", "Font server [0.3MB]",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86FontDists, '[', 'X', ']', DIST_XF86_FONTS_SERVER },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -635,6 +727,10 @@ Mono servers are particularly well-suited to most LCD displays).",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_W32 },
{ "nest", "A nested server for testing purposes [1.8MB]",
dmenuFlagCheck, dmenuSetFlag, NULL, &XF86ServerDists, '[', 'X', ']', DIST_XF86_SERVER_NEST },
+ { "Clear", "Reset XFree86 server list",
+ NULL, clearx11Servers, NULL, NULL, ' ', ' ', ' ' },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -677,14 +773,14 @@ details on the type of distribution you wish to have, where you wish\n\
to install it from and how you wish to allocate disk storage to FreeBSD.",
"Press F1 to read the installation guide",
"install",
-{ { "Options", "Go to Options editor", NULL, optionsEditor },
- { "Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor },
- { "Label", "Label allocated disk partitions", NULL, diskLabelEditor },
- { "Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
- { "Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
- { "Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCommit },
- { "Extract", "Just do distribution extract step", NULL, distExtractAll },
- { "Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
+{ { "1 Options", "Go to Options editor", NULL, optionsEditor },
+ { "2 Partition", "Allocate disk space for FreeBSD", NULL, diskPartitionEditor },
+ { "3 Label", "Label allocated disk partitions", NULL, diskLabelEditor },
+ { "4 Distributions", "Select distribution(s) to extract", NULL, dmenuSubmenu, NULL, &MenuDistributions },
+ { "5 Media", "Choose the installation media type", NULL, dmenuSubmenu, NULL, &MenuMedia },
+ { "6 Commit", "Perform any pending Partition/Label/Extract actions", NULL, installCommit },
+ { "7 Extract", "Just do distribution extract step", NULL, distExtractAll },
+ { "0 Exit", "Exit this menu (returning to previous)", NULL, dmenuCancel },
{ NULL } },
};
@@ -722,31 +818,31 @@ you can use the Packages utility to load extra \"3rd party\"\n\
software not provided in the base distributions.",
"Press F1 for more information on these options",
"configure",
-{ { "Add User", "Add users to the system",
+{ { "1 Add User", "Add users to the system",
NULL, dmenuSystemCommand, NULL, "adduser -config_create ; adduser -s" },
- { "Console", "Customize system console behavior",
+ { "2 Console", "Customize system console behavior",
NULL, dmenuSubmenu, NULL, &MenuSyscons },
- { "Time Zone", "Set which time zone you're in",
+ { "3 Time Zone", "Set which time zone you're in",
NULL, dmenuSystemCommand, NULL, "rm -f /etc/wall_cmos_clock /etc/localtime; tzsetup" },
- { "Media", "Change the installation media type",
+ { "4 Media", "Change the installation media type",
NULL, dmenuSubmenu, NULL, &MenuMedia },
- { "Mouse", "Select the type of mouse you have",
+ { "5 Mouse", "Select the type of mouse you have",
NULL, dmenuSubmenu, NULL, &MenuMouse, NULL },
- { "Networking", "Configure additional network services",
+ { "6 Networking", "Configure additional network services",
NULL, dmenuSubmenu, NULL, &MenuNetworking },
- { "Options", "Go to options editor",
+ { "7 Options", "Go to options editor",
NULL, optionsEditor },
- { "Packages", "Install pre-packaged software for FreeBSD",
+ { "8 Packages", "Install pre-packaged software for FreeBSD",
NULL, configPackages },
- { "Ports", "Link to FreeBSD Ports Collection on CD/NFS",
+ { "9 Ports", "Link to FreeBSD Ports Collection on CD/NFS",
NULL, configPorts },
- { "Root Password", "Set the system manager's password",
+ { "A Root Password", "Set the system manager's password",
NULL, dmenuSystemCommand, NULL, "passwd root" },
- { "HTML Docs", "Go to the HTML documentation menu (post-install)",
+ { "B HTML Docs", "Go to the HTML documentation menu (post-install)",
NULL, docBrowser },
- { "XFree86", "Configure XFree86",
+ { "C XFree86", "Configure XFree86",
NULL, configXFree86 },
- { "Exit", "Exit this menu (returning to previous)",
+ { "0 Exit", "Exit this menu (returning to previous)",
NULL, dmenuCancel },
{ NULL } },
};
@@ -784,6 +880,8 @@ aspects of your system's network configuration.",
NULL, configSamba },
{ "PCNFSD", "Run authentication server for clients with PC-NFS.",
NULL, configPCNFSD },
+ { "Exit", "Exit this menu (returning to previous)",
+ NULL, dmenuCancel, NULL, NULL, ' ', ' ', ' ' },
{ NULL } },
};
@@ -868,6 +966,7 @@ the other keymaps below.",
{ "French ISO", "French ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=fr.iso" },
{ "German CP850", "German Code Page 850 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.cp850" },
{ "German ISO", "German ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=german.iso" },
+ { "Italian", "Italian ISO keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=it.iso" },
{ "Japanese 106", "Japanese 106 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=jp.106" },
{ "Russian CP866", "Russian Code Page 866 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.cp866" },
{ "Russian KOI8", "Russian koi8 keymap", dmenuVarCheck, dmenuSetVariable, NULL, "keymap=ru.koi8-r" },
diff --git a/release/sysinstall/misc.c b/release/sysinstall/misc.c
index 64b46eb..2da5dd7 100644
--- a/release/sysinstall/misc.c
+++ b/release/sysinstall/misc.c
@@ -1,7 +1,7 @@
/*
* Miscellaneous support routines..
*
- * $Id: misc.c,v 1.15 1996/03/18 15:28:03 jkh Exp $
+ * $Id: misc.c,v 1.16 1996/04/13 13:32:00 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -261,14 +261,12 @@ Mkdir(char *ipath, void *data)
*p = '\0';
if (stat(path, &sb)) {
if (errno != ENOENT) {
- dialog_clear();
msgConfirm("Couldn't stat directory %s: %s", path, strerror(errno));
return DITEM_FAILURE;
}
if (isDebug())
msgDebug("mkdir(%s..)\n", path);
if (mkdir(path, S_IRWXU | S_IRWXG | S_IRWXO) < 0) {
- dialog_clear();
msgConfirm("Couldn't create directory %s: %s", path,strerror(errno));
return DITEM_FAILURE;
}
@@ -297,7 +295,6 @@ Mount(char *mountp, void *dev)
memset(&ufsargs,0,sizeof ufsargs);
if (Mkdir(mountpoint, NULL)) {
- dialog_clear();
msgConfirm("Unable to make directory mountpoint for %s!", mountpoint);
return DITEM_FAILURE;
}
@@ -306,7 +303,6 @@ Mount(char *mountp, void *dev)
ufsargs.fspec = device;
if (mount(MOUNT_UFS, mountpoint, MNT_ASYNC, (caddr_t)&ufsargs) == -1) {
- dialog_clear();
msgConfirm("Error mounting %s on %s : %s", device, mountpoint, strerror(errno));
return DITEM_FAILURE;
}
diff --git a/release/sysinstall/network.c b/release/sysinstall/network.c
index f7ca433..f1d7c30 100644
--- a/release/sysinstall/network.c
+++ b/release/sysinstall/network.c
@@ -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: network.c,v 1.9 1995/12/07 10:34:10 peter Exp $
+ * $Id: network.c,v 1.10 1996/04/13 13:32:03 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -66,11 +66,9 @@ mediaInitNetwork(Device *dev)
dev->private = NULL;
}
if (!strncmp("cuaa", dev->name, 4)) {
- dialog_clear();
if (!msgYesNo("You have selected a serial-line network interface.\n"
"Do you want to use PPP with it?")) {
if (!(dev->private = (void *)startPPP(dev))) {
- dialog_clear();
msgConfirm("Unable to start PPP! This installation method cannot be used.");
return FALSE;
}
@@ -97,7 +95,6 @@ mediaInitNetwork(Device *dev)
else
strcpy(attach, val);
if (vsystem(attach)) {
- dialog_clear();
msgConfirm("slattach returned a bad status! Please verify that\n"
"the command is correct and try again.");
return FALSE;
@@ -111,7 +108,6 @@ mediaInitNetwork(Device *dev)
snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name);
cp = variable_get(ifconfig);
if (!cp) {
- dialog_clear();
msgConfirm("The %s device is not configured. You will need to do so\n"
"in the Networking configuration menu before proceeding.", ifname);
return FALSE;
@@ -119,7 +115,6 @@ mediaInitNetwork(Device *dev)
msgNotify("Configuring network device %s.", ifname);
i = vsystem("ifconfig %s %s", ifname, cp);
if (i) {
- dialog_clear();
msgConfirm("Unable to configure the %s interface!\n"
"This installation method cannot be used.", ifname);
return FALSE;
@@ -127,7 +122,6 @@ mediaInitNetwork(Device *dev)
rp = variable_get(VAR_GATEWAY);
if (!rp || *rp == '0') {
- dialog_clear();
msgConfirm("No gateway has been set. You may be unable to access hosts\n"
"not on your local network");
}
@@ -159,10 +153,8 @@ mediaShutdownNetwork(Device *dev)
return;
msgNotify("Shutting interface %s down.", dev->name);
i = vsystem("ifconfig %s down", dev->name);
- if (i) {
- dialog_clear();
+ if (i)
msgConfirm("Warning: Unable to down the %s interface properly", dev->name);
- }
cp = variable_get(VAR_GATEWAY);
if (cp) {
msgNotify("Deleting default route.");
@@ -228,7 +220,6 @@ startPPP(Device *devp)
}
fp = fopen("/etc/ppp/ppp.conf", "w");
if (!fp) {
- dialog_clear();
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
return 0;
}
@@ -239,7 +230,6 @@ startPPP(Device *devp)
fclose(fp);
if (!file_readable("/dev/tun0") && mknod("/dev/tun0", 0600 | S_IFCHR, makedev(52, 0))) {
- dialog_clear();
msgConfirm("Warning: No /dev/tun0 device. PPP will not work!");
return 0;
}
@@ -271,7 +261,6 @@ startPPP(Device *devp)
exit(1);
}
else {
- dialog_clear();
msgConfirm("The PPP command is now started on VTY3 (type ALT-F3 to\n"
"interact with it, ALT-F1 to switch back here). The only command\n"
"you'll probably want or need to use is the \"term\" command\n"
diff --git a/release/sysinstall/nfs.c b/release/sysinstall/nfs.c
index 71332dd..cd2e963 100644
--- a/release/sysinstall/nfs.c
+++ b/release/sysinstall/nfs.c
@@ -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: nfs.c,v 1.7 1996/03/02 07:31:55 jkh Exp $
+ * $Id: nfs.c,v 1.8 1996/04/13 13:32:05 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -61,7 +61,6 @@ mediaInitNFS(Device *dev)
if (vsystem("mount_nfs %s %s %s /dist",
variable_get(VAR_SLOW_ETHER) ? "-r 1024 -w 1024" : "",
variable_get(VAR_NFS_SECURE) ? "-P" : "", dev->name)) {
- dialog_clear();
msgConfirm("Error mounting %s on /dist: %s (%u)", dev->name, strerror(errno), errno);
netDevice->shutdown(netDevice);
return FALSE;
@@ -98,10 +97,8 @@ mediaShutdownNFS(Device *dev)
if (!NFSMounted)
return;
msgNotify("Unmounting NFS partition on /dist");
- if (unmount("/dist", MNT_FORCE) != 0) {
- dialog_clear();
+ if (unmount("/dist", MNT_FORCE) != 0)
msgConfirm("Could not unmount the NFS partition: %s", strerror(errno));
- }
msgDebug("Unmount of NFS partition successful\n");
/* (*netdev->shutdown)(netdev); */
NFSMounted = FALSE;
diff --git a/release/sysinstall/options.c b/release/sysinstall/options.c
index 60c8269..de51b5e 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.32 1996/04/07 03:52:34 jkh Exp $
+ * $Id: options.c,v 1.33 1996/04/13 13:32:06 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -272,12 +272,13 @@ optionsEditor(dialogMenuItem *self)
case 'Q':
clear();
dialog_clear();
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
default:
beep();
}
}
/* NOTREACHED */
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
+
diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c
index 0a32fc3..c374181 100644
--- a/release/sysinstall/package.c
+++ b/release/sysinstall/package.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: package.c,v 1.30 1996/03/21 09:30:14 jkh Exp $
+ * $Id: package.c,v 1.31 1996/04/13 13:32:07 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -71,7 +71,6 @@ package_extract(Device *dev, char *name, Boolean depended)
}
if (!dev->init(dev)) {
- dialog_clear();
msgConfirm("Unable to initialize media type for package extract.");
return DITEM_FAILURE;
}
@@ -92,7 +91,6 @@ package_extract(Device *dev, char *name, Boolean depended)
int i, tot, pfd[2];
pid_t pid;
- dialog_clear();
msgNotify("Adding %s%s\nfrom %s", path, depended ? " (as a dependency)" : "", dev->name);
pipe(pfd);
pid = fork();
@@ -143,11 +141,10 @@ package_extract(Device *dev, char *name, Boolean depended)
msgNotify("Unable to fetch package %s from selected media.\n"
"No package add will be done.", name);
else {
- dialog_clear();
msgConfirm("Unable to fetch package %s from selected media.\n"
"No package add will be done.", name);
}
ret = DITEM_FAILURE;
}
- return ret;
+ return ret | DITEM_RESTORE;
}
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index 353da90..00ce68d 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/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.49 1996/04/07 03:52:35 jkh Exp $
+ * $Id: sysinstall.h,v 1.50 1996/04/13 13:32:09 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -383,6 +383,7 @@ extern void diskPartition(Device *dev, Disk *d);
/* dist.c */
extern int distSetCustom(char *str);
extern int distReset(dialogMenuItem *self);
+extern int distSrcReset(dialogMenuItem *self);
extern int distSetDeveloper(dialogMenuItem *self);
extern int distSetXDeveloper(dialogMenuItem *self);
extern int distSetKernDeveloper(dialogMenuItem *self);
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index 14f125a..5258eb8 100644
--- a/release/sysinstall/system.c
+++ b/release/sysinstall/system.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: system.c,v 1.49 1996/03/21 09:30:17 jkh Exp $
+ * $Id: system.c,v 1.50 1996/04/13 13:32:10 jkh Exp $
*
* Jordan Hubbard
*
@@ -101,7 +101,6 @@ systemExecute(char *command)
int status;
struct termios foo;
- dialog_clear();
dialog_update();
end_dialog();
DialogActive = FALSE;
@@ -111,8 +110,6 @@ systemExecute(char *command)
}
status = system(command);
DialogActive = TRUE;
- dialog_clear();
- dialog_update();
return status;
}
@@ -122,24 +119,19 @@ systemDisplayHelp(char *file)
{
char *fname = NULL;
char buf[FILENAME_MAX];
- WINDOW *w;
fname = systemHelpFile(file, buf);
if (!fname) {
snprintf(buf, FILENAME_MAX, "The %s file is not provided on this particular floppy image.", file);
use_helpfile(NULL);
use_helpline(NULL);
- w = savescr();
dialog_mesgbox("Sorry!", buf, -1, -1);
- restorescr(w);
return 1;
}
else {
use_helpfile(NULL);
use_helpline(NULL);
- w = savescr();
dialog_textbox(file, fname, LINES, COLS);
- restorescr(w);
}
return 0;
}
diff --git a/release/sysinstall/tape.c b/release/sysinstall/tape.c
index abafe81..166c786 100644
--- a/release/sysinstall/tape.c
+++ b/release/sysinstall/tape.c
@@ -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: tape.c,v 1.9 1996/03/02 07:31:57 jkh Exp $
+ * $Id: tape.c,v 1.10 1996/04/13 13:32:11 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -72,10 +72,8 @@ mediaInitTape(Device *dev)
msgDebug("Tape initialized successfully.\n");
return TRUE;
}
- else {
- dialog_clear();
+ else
msgConfirm("Tape extract command failed with status %d!", i);
- }
return FALSE;
}
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index 685ed56..fbde09a 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -1,5 +1,5 @@
/*
- * $Id: tcpip.c,v 1.34 1996/04/07 03:52:36 jkh Exp $
+ * $Id: tcpip.c,v 1.35 1996/04/13 13:32:12 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@@ -225,7 +225,7 @@ tcpInstallDevice(char *str)
int
tcpOpenDialog(Device *devp)
{
- WINDOW *ds_win;
+ WINDOW *ds_win, *save;
ComposeObj *obj = NULL;
ComposeObj *first, *last;
int n=0, quit=FALSE, cancel=FALSE, ret;
@@ -234,6 +234,7 @@ tcpOpenDialog(Device *devp)
char help[FILENAME_MAX];
char title[80];
+ save = savescr();
/* We need a curses window */
ds_win = newwin(LINES, COLS, 0, 0);
if (ds_win == 0)
@@ -505,8 +506,10 @@ tcpOpenDialog(Device *devp)
}
if (ipaddr[0])
variable_set2(VAR_IPADDR, ipaddr);
+ restorescr(save);
return DITEM_SUCCESS;
}
+ restorescr(save);
return DITEM_FAILURE;
}
diff --git a/release/sysinstall/variable.c b/release/sysinstall/variable.c
index 6fbd643..4f7ad73 100644
--- a/release/sysinstall/variable.c
+++ b/release/sysinstall/variable.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: variable.c,v 1.7 1995/12/07 10:34:23 peter Exp $
+ * $Id: variable.c,v 1.8 1996/04/13 13:32:15 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -128,12 +128,10 @@ char *
variable_get_value(char *var, char *prompt)
{
char *cp;
-
- dialog_clear();
+
if ((cp = msgGetInput(variable_get(var), prompt)) != NULL)
variable_set2(var, cp);
else
cp = NULL;
- dialog_clear();
return cp;
}
OpenPOWER on IntegriCloud