summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--release/sysinstall/anonFTP.c4
-rw-r--r--release/sysinstall/devices.c1
-rw-r--r--release/sysinstall/disks.c2
-rw-r--r--release/sysinstall/dist.c8
-rw-r--r--release/sysinstall/install.c1
-rw-r--r--release/sysinstall/media.c2
-rw-r--r--release/sysinstall/menus.c12
-rw-r--r--release/sysinstall/mouse.c2
-rw-r--r--release/sysinstall/msg.c4
-rw-r--r--release/sysinstall/network.c17
-rw-r--r--release/sysinstall/nfs.c5
-rw-r--r--release/sysinstall/package.c2
-rw-r--r--release/sysinstall/system.c3
-rw-r--r--release/sysinstall/tape.c6
-rw-r--r--release/sysinstall/tcpip.c2
-rw-r--r--usr.sbin/sade/devices.c1
-rw-r--r--usr.sbin/sade/disks.c2
-rw-r--r--usr.sbin/sade/install.c1
-rw-r--r--usr.sbin/sade/menus.c12
-rw-r--r--usr.sbin/sade/msg.c4
-rw-r--r--usr.sbin/sade/system.c3
-rw-r--r--usr.sbin/sysinstall/anonFTP.c4
-rw-r--r--usr.sbin/sysinstall/devices.c1
-rw-r--r--usr.sbin/sysinstall/disks.c2
-rw-r--r--usr.sbin/sysinstall/dist.c8
-rw-r--r--usr.sbin/sysinstall/install.c1
-rw-r--r--usr.sbin/sysinstall/media.c2
-rw-r--r--usr.sbin/sysinstall/menus.c12
-rw-r--r--usr.sbin/sysinstall/mouse.c2
-rw-r--r--usr.sbin/sysinstall/msg.c4
-rw-r--r--usr.sbin/sysinstall/network.c17
-rw-r--r--usr.sbin/sysinstall/nfs.c5
-rw-r--r--usr.sbin/sysinstall/package.c2
-rw-r--r--usr.sbin/sysinstall/system.c3
-rw-r--r--usr.sbin/sysinstall/tape.c6
-rw-r--r--usr.sbin/sysinstall/tcpip.c2
36 files changed, 97 insertions, 68 deletions
diff --git a/release/sysinstall/anonFTP.c b/release/sysinstall/anonFTP.c
index 04f8fbc..83795cd 100644
--- a/release/sysinstall/anonFTP.c
+++ b/release/sysinstall/anonFTP.c
@@ -179,7 +179,7 @@ createFtpUser(void)
fclose(fptr);
msgNotify("Remaking password file: %s", _PATH_MASTERPASSWD);
vsystem("pwd_mkdb -p %s", _PATH_MASTERPASSWD);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
/* This is it - how to get the setup values */
@@ -311,5 +311,5 @@ configAnonFTP(dialogMenuItem *self)
}
if (DITEM_STATUS(i) == DITEM_SUCCESS)
variable_set2("anon_ftp", "YES", 0);
- return i;
+ return i | DITEM_RESTORE;
}
diff --git a/release/sysinstall/devices.c b/release/sysinstall/devices.c
index dd61e27..e4dcf92 100644
--- a/release/sysinstall/devices.c
+++ b/release/sysinstall/devices.c
@@ -438,6 +438,7 @@ skipif:
}
free(names);
}
+ dialog_clear_norefresh();
}
/* Rescan all devices, after closing previous set - convenience function */
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index 20a7e90..2a611b9 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -678,7 +678,7 @@ diskPartitionWrite(dialogMenuItem *self)
}
/* Now it's not "yes", but "written" */
variable_set2(DISK_PARTITIONED, "written", 0);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
/* Partition a disk based wholly on which variables are set */
diff --git a/release/sysinstall/dist.c b/release/sysinstall/dist.c
index a834af8..abb1d54 100644
--- a/release/sysinstall/dist.c
+++ b/release/sysinstall/dist.c
@@ -389,6 +389,7 @@ distMaybeSetDES(dialogMenuItem *self)
{
int i = DITEM_SUCCESS | DITEM_REDRAW;
+ dialog_clear_norefresh();
if (!msgYesNo("Do you wish to install DES cryptographic software?\n\n"
"If you choose No, FreeBSD will use an MD5 based password scheme which,\n"
"while perhaps more secure, is not interoperable with the traditional\n"
@@ -404,12 +405,13 @@ distMaybeSetDES(dialogMenuItem *self)
i = DITEM_FAILURE;
}
distVerifyFlags();
- return i | DITEM_REDRAW;
+ return i | DITEM_REDRAW | DITEM_RESTORE;
}
static int
distMaybeSetPorts(dialogMenuItem *self)
{
+ dialog_clear_norefresh();
if (!msgYesNo("Would you like to install the FreeBSD ports collection?\n\n"
"This will give you ready access to over 2000 ported software packages,\n"
"though at a cost of around 90MB of disk space when \"clean\" and possibly\n"
@@ -423,7 +425,7 @@ distMaybeSetPorts(dialogMenuItem *self)
Dists |= DIST_PORTS;
else
Dists &= ~DIST_PORTS;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
static Boolean
@@ -865,8 +867,8 @@ distExtractAll(dialogMenuItem *self)
distVerifyFlags();
dialog_clear_norefresh();
- msgNotify("Attempting to install all selected distributions..");
w = savescr();
+ msgNotify("Attempting to install all selected distributions..");
/* Try for 3 times around the loop, then give up. */
while (Dists && ++retries < 3)
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 8d9da81..1b8c43e 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -961,6 +961,7 @@ installFilesystems(dialogMenuItem *self)
command_sort();
command_execute();
+ dialog_clear_norefresh();
return DITEM_SUCCESS;
}
diff --git a/release/sysinstall/media.c b/release/sysinstall/media.c
index 1c27a0d..2ca3ea5 100644
--- a/release/sysinstall/media.c
+++ b/release/sysinstall/media.c
@@ -416,7 +416,7 @@ mediaSetFTP(dialogMenuItem *self)
ftpDevice.shutdown = mediaShutdownFTP;
ftpDevice.private = networkDev;
mediaDevice = &ftpDevice;
- return DITEM_SUCCESS | DITEM_LEAVE_MENU;
+ return DITEM_SUCCESS | DITEM_LEAVE_MENU | DITEM_RESTORE;
}
int
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 0cc8c0c..ff0b96c 100644
--- a/release/sysinstall/menus.c
+++ b/release/sysinstall/menus.c
@@ -819,7 +819,7 @@ DMenu MenuSubDistributions = {
NULL,
NULL,
{ { "All", "All system sources, binaries and X Window System",
- NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
+ NULL, distSetEverything },
{ "Reset", "Reset all of the below",
NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
{ " bin", "Binary base distribution (required)",
@@ -875,7 +875,7 @@ DMenu MenuDESDistributions = {
NULL,
NULL,
{ { "All", "Select all of the below",
- NULL, setDES, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setDES },
{ "Reset", "Reset all of the below",
NULL, clearDES, NULL, NULL, ' ', ' ', ' ' },
{ " des", "Basic DES encryption services",
@@ -904,7 +904,7 @@ DMenu MenuSrcDistributions = {
NULL,
NULL,
{ { "All", "Select all of the below",
- NULL, setSrc, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setSrc },
{ "Reset", "Reset all of the below",
NULL, clearSrc, NULL, NULL, ' ', ' ', ' ' },
{ " base", "top-level files in /usr/src",
@@ -964,7 +964,7 @@ DMenu MenuXF86SelectCore = {
NULL,
NULL,
{ { "All", "Select all below",
- NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Misc },
{ "Reset", "Reset all below",
NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
{ " bin", "Client applications and shared libs",
@@ -1008,7 +1008,7 @@ install. At the minimum, you should install the standard\n\
NULL,
NULL,
{ { "All", "All fonts",
- NULL, setX11Fonts, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Fonts },
{ "Reset", "Reset font selections",
NULL, clearX11Fonts, NULL, NULL, ' ', ' ', ' ' },
{ " fnts", "Standard 75 DPI and miscellaneous fonts",
@@ -1036,7 +1036,7 @@ DMenu MenuXF86SelectServer = {
NULL,
NULL,
{ { "All", "Select all of the above",
- NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Servers },
{ "Reset", "Reset all of the above",
NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
{ " SVGA", "Standard VGA or Super VGA card",
diff --git a/release/sysinstall/mouse.c b/release/sysinstall/mouse.c
index 5670b9a..2eec6be 100644
--- a/release/sysinstall/mouse.c
+++ b/release/sysinstall/mouse.c
@@ -67,7 +67,7 @@ mousedTest(dialogMenuItem *self)
vsystem("ln -fs /dev/sysmouse /dev/mouse"); /* backwards compat */
}
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
int
diff --git a/release/sysinstall/msg.c b/release/sysinstall/msg.c
index 3d7affe..499d705 100644
--- a/release/sysinstall/msg.c
+++ b/release/sysinstall/msg.c
@@ -206,7 +206,6 @@ msgNotify(char *fmt, ...)
{
va_list args;
char *errstr;
- WINDOW *w = savescr();
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
@@ -217,8 +216,6 @@ msgNotify(char *fmt, ...)
if (isDebug())
msgDebug("Notify: %s\n", errstr);
dialog_msgbox(NULL, errstr, -1, -1, 0);
- sleep(1);
- restorescr(w);
}
/* Put up a message in a popup yes/no box and return 1 for YES, 0 for NO */
@@ -310,6 +307,7 @@ msgWeHaveOutput(char *fmt, ...)
use_helpfile(NULL);
msgDebug("Notify: %s\n", errstr);
dialog_clear_norefresh();
+ sleep(2);
dialog_msgbox(NULL, errstr, -1, -1, 0);
restorescr(w);
}
diff --git a/release/sysinstall/network.c b/release/sysinstall/network.c
index b92e37b..5e064a7 100644
--- a/release/sysinstall/network.c
+++ b/release/sysinstall/network.c
@@ -70,9 +70,12 @@ mediaInitNetwork(Device *dev)
}
}
+ w = savescr();
+ dialog_clear_norefresh();
+
/* Old PPP process lying around? */
if (pppPID) {
- msgNotify("Killing previous PPP process %d.", pppPID);
+ msgConfirm("Killing previous PPP process %d.", pppPID);
kill(pppPID, SIGTERM);
pppPID = 0;
}
@@ -88,8 +91,6 @@ mediaInitNetwork(Device *dev)
char *val;
char attach[256];
- w = savescr();
- dialog_clear_norefresh();
/* Cheesy slip attach */
snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname);
val = msgGetInput(attach,
@@ -131,7 +132,7 @@ mediaInitNetwork(Device *dev)
}
else if (!strcmp(cp, "DHCP"))
goto bail;
- msgNotify("ifconfig %s %s", dev->name, cp);
+ msgDebug("ifconfig %s %s", dev->name, cp);
i = vsystem("ifconfig %s %s", dev->name, cp);
if (i) {
msgConfirm("Unable to configure the %s interface!\n"
@@ -145,7 +146,7 @@ mediaInitNetwork(Device *dev)
"not on your local network");
}
else {
- msgNotify("Adding default route to %s.", rp);
+ msgDebug("Adding default route to %s.", rp);
vsystem("route -n add default %s", rp);
}
bail:
@@ -173,18 +174,18 @@ mediaShutdownNetwork(Device *dev)
cp = variable_get(ifconfig);
if (!cp)
return;
- msgNotify("ifconfig %s down", dev->name);
+ msgDebug("ifconfig %s down", dev->name);
i = vsystem("ifconfig %s down", dev->name);
if (i)
msgConfirm("Warning: Unable to down the %s interface properly", dev->name);
cp = variable_get(VAR_GATEWAY);
if (cp) {
- msgNotify("Deleting default route.");
+ msgDebug("Deleting default route.");
vsystem("route -n delete default");
}
}
else if (pppPID) {
- msgNotify("Killing previous PPP process %d.", pppPID);
+ msgConfirm("Killing previous PPP process %d.", pppPID);
kill(pppPID, SIGTERM);
pppPID = 0;
}
diff --git a/release/sysinstall/nfs.c b/release/sysinstall/nfs.c
index 53b3f42..f9a5572 100644
--- a/release/sysinstall/nfs.c
+++ b/release/sysinstall/nfs.c
@@ -48,6 +48,7 @@ Boolean
mediaInitNFS(Device *dev)
{
Device *netDevice = (Device *)dev->private;
+ WINDOW *w = savescr();
if (NFSMounted)
return TRUE;
@@ -65,11 +66,13 @@ mediaInitNFS(Device *dev)
msgConfirm("Error mounting %s on %s: %s.", dev->name, mountpoint, strerror(errno));
if (netDevice)
netDevice->shutdown(netDevice);
+ restorescr(w);
return FALSE;
}
NFSMounted = TRUE;
if (isDebug())
msgDebug("Mounted NFS device %s onto %s\n", dev->name, mountpoint);
+ restorescr(w);
return TRUE;
}
@@ -85,7 +88,7 @@ mediaShutdownNFS(Device *dev)
if (!NFSMounted)
return;
- msgNotify("Unmounting NFS partition on %s", mountpoint);
+ msgDebug("Unmounting NFS partition on %s", mountpoint);
if (unmount(mountpoint, MNT_FORCE) != 0)
msgConfirm("Could not unmount the NFS partition: %s", strerror(errno));
NFSMounted = FALSE;
diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c
index e11a2c7..4af188a 100644
--- a/release/sysinstall/package.c
+++ b/release/sysinstall/package.c
@@ -157,6 +157,7 @@ package_extract(Device *dev, char *name, Boolean depended)
if (fp) {
int i = 0, tot, pfd[2];
pid_t pid;
+ WINDOW *w = savescr();
sigpipe_caught = FALSE;
signal(SIGPIPE, catch_pipe);
@@ -176,7 +177,6 @@ package_extract(Device *dev, char *name, Boolean depended)
}
else {
char buf[BUFSIZ];
- WINDOW *w = savescr();
struct timeval start, stop;
close(pfd[0]);
diff --git a/release/sysinstall/system.c b/release/sysinstall/system.c
index c03d211..dfe3889 100644
--- a/release/sysinstall/system.c
+++ b/release/sysinstall/system.c
@@ -399,8 +399,11 @@ systemCreateHoloshell(void)
exit(1);
}
else {
+ WINDOW *w = savescr();
+
msgNotify("Starting an emergency holographic shell on VTY4");
sleep(2);
+ restorescr(w);
}
}
}
diff --git a/release/sysinstall/tape.c b/release/sysinstall/tape.c
index 53518ef..256fe95 100644
--- a/release/sysinstall/tape.c
+++ b/release/sysinstall/tape.c
@@ -68,6 +68,8 @@ mediaGetTape(Device *dev, char *file, Boolean probe)
int i;
if (!tapeInitted) {
+ WINDOW *w = savescr();
+
msgDebug("Tape init routine called for %s (private dir is %s)\n", dev->name, dev->private);
Mkdir(dev->private);
if (chdir(dev->private)) {
@@ -88,8 +90,10 @@ mediaGetTape(Device *dev, char *file, Boolean probe)
else {
msgConfirm("Tape extract command failed with status %d!\n"
"Unable to use tape media.", i);
+ restorescr(w);
return (FILE *)IO_ERROR;
}
+ restorescr(w);
}
sprintf(buf, "%s/%s", (char *)dev->private, file);
@@ -113,7 +117,7 @@ mediaShutdownTape(Device *dev)
if (!tapeInitted)
return;
if (file_readable((char *)dev->private)) {
- msgNotify("Cleaning up results of tape extract in %s..",
+ msgDebug("Cleaning up results of tape extract in %s..",
(char *)dev->private);
(void)vsystem("rm -rf %s", (char *)dev->private);
}
diff --git a/release/sysinstall/tcpip.c b/release/sysinstall/tcpip.c
index 28273f3..453fe5f 100644
--- a/release/sysinstall/tcpip.c
+++ b/release/sysinstall/tcpip.c
@@ -205,6 +205,7 @@ tcpOpenDialog(Device *devp)
char *tmp;
char title[80];
+ save = savescr();
/* Initialise vars from previous device values */
if (devp->private) {
DevInfo *di = (DevInfo *)devp->private;
@@ -282,7 +283,6 @@ tcpOpenDialog(Device *devp)
SAFE_STRCPY(nameserver, tmp);
}
- save = savescr();
/* If non-interactive, jump straight over the dialog crap and into config section */
if (variable_get(VAR_NONINTERACTIVE) &&
!variable_get(VAR_NETINTERACTIVE)) {
diff --git a/usr.sbin/sade/devices.c b/usr.sbin/sade/devices.c
index dd61e27..e4dcf92 100644
--- a/usr.sbin/sade/devices.c
+++ b/usr.sbin/sade/devices.c
@@ -438,6 +438,7 @@ skipif:
}
free(names);
}
+ dialog_clear_norefresh();
}
/* Rescan all devices, after closing previous set - convenience function */
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index 20a7e90..2a611b9 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -678,7 +678,7 @@ diskPartitionWrite(dialogMenuItem *self)
}
/* Now it's not "yes", but "written" */
variable_set2(DISK_PARTITIONED, "written", 0);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
/* Partition a disk based wholly on which variables are set */
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 8d9da81..1b8c43e 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -961,6 +961,7 @@ installFilesystems(dialogMenuItem *self)
command_sort();
command_execute();
+ dialog_clear_norefresh();
return DITEM_SUCCESS;
}
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 0cc8c0c..ff0b96c 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/menus.c
@@ -819,7 +819,7 @@ DMenu MenuSubDistributions = {
NULL,
NULL,
{ { "All", "All system sources, binaries and X Window System",
- NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
+ NULL, distSetEverything },
{ "Reset", "Reset all of the below",
NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
{ " bin", "Binary base distribution (required)",
@@ -875,7 +875,7 @@ DMenu MenuDESDistributions = {
NULL,
NULL,
{ { "All", "Select all of the below",
- NULL, setDES, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setDES },
{ "Reset", "Reset all of the below",
NULL, clearDES, NULL, NULL, ' ', ' ', ' ' },
{ " des", "Basic DES encryption services",
@@ -904,7 +904,7 @@ DMenu MenuSrcDistributions = {
NULL,
NULL,
{ { "All", "Select all of the below",
- NULL, setSrc, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setSrc },
{ "Reset", "Reset all of the below",
NULL, clearSrc, NULL, NULL, ' ', ' ', ' ' },
{ " base", "top-level files in /usr/src",
@@ -964,7 +964,7 @@ DMenu MenuXF86SelectCore = {
NULL,
NULL,
{ { "All", "Select all below",
- NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Misc },
{ "Reset", "Reset all below",
NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
{ " bin", "Client applications and shared libs",
@@ -1008,7 +1008,7 @@ install. At the minimum, you should install the standard\n\
NULL,
NULL,
{ { "All", "All fonts",
- NULL, setX11Fonts, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Fonts },
{ "Reset", "Reset font selections",
NULL, clearX11Fonts, NULL, NULL, ' ', ' ', ' ' },
{ " fnts", "Standard 75 DPI and miscellaneous fonts",
@@ -1036,7 +1036,7 @@ DMenu MenuXF86SelectServer = {
NULL,
NULL,
{ { "All", "Select all of the above",
- NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Servers },
{ "Reset", "Reset all of the above",
NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
{ " SVGA", "Standard VGA or Super VGA card",
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c
index 3d7affe..499d705 100644
--- a/usr.sbin/sade/msg.c
+++ b/usr.sbin/sade/msg.c
@@ -206,7 +206,6 @@ msgNotify(char *fmt, ...)
{
va_list args;
char *errstr;
- WINDOW *w = savescr();
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
@@ -217,8 +216,6 @@ msgNotify(char *fmt, ...)
if (isDebug())
msgDebug("Notify: %s\n", errstr);
dialog_msgbox(NULL, errstr, -1, -1, 0);
- sleep(1);
- restorescr(w);
}
/* Put up a message in a popup yes/no box and return 1 for YES, 0 for NO */
@@ -310,6 +307,7 @@ msgWeHaveOutput(char *fmt, ...)
use_helpfile(NULL);
msgDebug("Notify: %s\n", errstr);
dialog_clear_norefresh();
+ sleep(2);
dialog_msgbox(NULL, errstr, -1, -1, 0);
restorescr(w);
}
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c
index c03d211..dfe3889 100644
--- a/usr.sbin/sade/system.c
+++ b/usr.sbin/sade/system.c
@@ -399,8 +399,11 @@ systemCreateHoloshell(void)
exit(1);
}
else {
+ WINDOW *w = savescr();
+
msgNotify("Starting an emergency holographic shell on VTY4");
sleep(2);
+ restorescr(w);
}
}
}
diff --git a/usr.sbin/sysinstall/anonFTP.c b/usr.sbin/sysinstall/anonFTP.c
index 04f8fbc..83795cd 100644
--- a/usr.sbin/sysinstall/anonFTP.c
+++ b/usr.sbin/sysinstall/anonFTP.c
@@ -179,7 +179,7 @@ createFtpUser(void)
fclose(fptr);
msgNotify("Remaking password file: %s", _PATH_MASTERPASSWD);
vsystem("pwd_mkdb -p %s", _PATH_MASTERPASSWD);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
/* This is it - how to get the setup values */
@@ -311,5 +311,5 @@ configAnonFTP(dialogMenuItem *self)
}
if (DITEM_STATUS(i) == DITEM_SUCCESS)
variable_set2("anon_ftp", "YES", 0);
- return i;
+ return i | DITEM_RESTORE;
}
diff --git a/usr.sbin/sysinstall/devices.c b/usr.sbin/sysinstall/devices.c
index dd61e27..e4dcf92 100644
--- a/usr.sbin/sysinstall/devices.c
+++ b/usr.sbin/sysinstall/devices.c
@@ -438,6 +438,7 @@ skipif:
}
free(names);
}
+ dialog_clear_norefresh();
}
/* Rescan all devices, after closing previous set - convenience function */
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index 20a7e90..2a611b9 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -678,7 +678,7 @@ diskPartitionWrite(dialogMenuItem *self)
}
/* Now it's not "yes", but "written" */
variable_set2(DISK_PARTITIONED, "written", 0);
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
/* Partition a disk based wholly on which variables are set */
diff --git a/usr.sbin/sysinstall/dist.c b/usr.sbin/sysinstall/dist.c
index a834af8..abb1d54 100644
--- a/usr.sbin/sysinstall/dist.c
+++ b/usr.sbin/sysinstall/dist.c
@@ -389,6 +389,7 @@ distMaybeSetDES(dialogMenuItem *self)
{
int i = DITEM_SUCCESS | DITEM_REDRAW;
+ dialog_clear_norefresh();
if (!msgYesNo("Do you wish to install DES cryptographic software?\n\n"
"If you choose No, FreeBSD will use an MD5 based password scheme which,\n"
"while perhaps more secure, is not interoperable with the traditional\n"
@@ -404,12 +405,13 @@ distMaybeSetDES(dialogMenuItem *self)
i = DITEM_FAILURE;
}
distVerifyFlags();
- return i | DITEM_REDRAW;
+ return i | DITEM_REDRAW | DITEM_RESTORE;
}
static int
distMaybeSetPorts(dialogMenuItem *self)
{
+ dialog_clear_norefresh();
if (!msgYesNo("Would you like to install the FreeBSD ports collection?\n\n"
"This will give you ready access to over 2000 ported software packages,\n"
"though at a cost of around 90MB of disk space when \"clean\" and possibly\n"
@@ -423,7 +425,7 @@ distMaybeSetPorts(dialogMenuItem *self)
Dists |= DIST_PORTS;
else
Dists &= ~DIST_PORTS;
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
static Boolean
@@ -865,8 +867,8 @@ distExtractAll(dialogMenuItem *self)
distVerifyFlags();
dialog_clear_norefresh();
- msgNotify("Attempting to install all selected distributions..");
w = savescr();
+ msgNotify("Attempting to install all selected distributions..");
/* Try for 3 times around the loop, then give up. */
while (Dists && ++retries < 3)
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 8d9da81..1b8c43e 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -961,6 +961,7 @@ installFilesystems(dialogMenuItem *self)
command_sort();
command_execute();
+ dialog_clear_norefresh();
return DITEM_SUCCESS;
}
diff --git a/usr.sbin/sysinstall/media.c b/usr.sbin/sysinstall/media.c
index 1c27a0d..2ca3ea5 100644
--- a/usr.sbin/sysinstall/media.c
+++ b/usr.sbin/sysinstall/media.c
@@ -416,7 +416,7 @@ mediaSetFTP(dialogMenuItem *self)
ftpDevice.shutdown = mediaShutdownFTP;
ftpDevice.private = networkDev;
mediaDevice = &ftpDevice;
- return DITEM_SUCCESS | DITEM_LEAVE_MENU;
+ return DITEM_SUCCESS | DITEM_LEAVE_MENU | DITEM_RESTORE;
}
int
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 0cc8c0c..ff0b96c 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/sysinstall/menus.c
@@ -819,7 +819,7 @@ DMenu MenuSubDistributions = {
NULL,
NULL,
{ { "All", "All system sources, binaries and X Window System",
- NULL, distSetEverything, NULL, NULL, ' ', ' ', ' ' },
+ NULL, distSetEverything },
{ "Reset", "Reset all of the below",
NULL, distReset, NULL, NULL, ' ', ' ', ' ' },
{ " bin", "Binary base distribution (required)",
@@ -875,7 +875,7 @@ DMenu MenuDESDistributions = {
NULL,
NULL,
{ { "All", "Select all of the below",
- NULL, setDES, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setDES },
{ "Reset", "Reset all of the below",
NULL, clearDES, NULL, NULL, ' ', ' ', ' ' },
{ " des", "Basic DES encryption services",
@@ -904,7 +904,7 @@ DMenu MenuSrcDistributions = {
NULL,
NULL,
{ { "All", "Select all of the below",
- NULL, setSrc, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setSrc },
{ "Reset", "Reset all of the below",
NULL, clearSrc, NULL, NULL, ' ', ' ', ' ' },
{ " base", "top-level files in /usr/src",
@@ -964,7 +964,7 @@ DMenu MenuXF86SelectCore = {
NULL,
NULL,
{ { "All", "Select all below",
- NULL, setX11Misc, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Misc },
{ "Reset", "Reset all below",
NULL, clearX11Misc, NULL, NULL, ' ', ' ', ' ' },
{ " bin", "Client applications and shared libs",
@@ -1008,7 +1008,7 @@ install. At the minimum, you should install the standard\n\
NULL,
NULL,
{ { "All", "All fonts",
- NULL, setX11Fonts, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Fonts },
{ "Reset", "Reset font selections",
NULL, clearX11Fonts, NULL, NULL, ' ', ' ', ' ' },
{ " fnts", "Standard 75 DPI and miscellaneous fonts",
@@ -1036,7 +1036,7 @@ DMenu MenuXF86SelectServer = {
NULL,
NULL,
{ { "All", "Select all of the above",
- NULL, setX11Servers, NULL, NULL, ' ', ' ', ' ' },
+ NULL, setX11Servers },
{ "Reset", "Reset all of the above",
NULL, clearX11Servers, NULL, NULL, ' ', ' ', ' ' },
{ " SVGA", "Standard VGA or Super VGA card",
diff --git a/usr.sbin/sysinstall/mouse.c b/usr.sbin/sysinstall/mouse.c
index 5670b9a..2eec6be 100644
--- a/usr.sbin/sysinstall/mouse.c
+++ b/usr.sbin/sysinstall/mouse.c
@@ -67,7 +67,7 @@ mousedTest(dialogMenuItem *self)
vsystem("ln -fs /dev/sysmouse /dev/mouse"); /* backwards compat */
}
- return DITEM_SUCCESS;
+ return DITEM_SUCCESS | DITEM_RESTORE;
}
int
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c
index 3d7affe..499d705 100644
--- a/usr.sbin/sysinstall/msg.c
+++ b/usr.sbin/sysinstall/msg.c
@@ -206,7 +206,6 @@ msgNotify(char *fmt, ...)
{
va_list args;
char *errstr;
- WINDOW *w = savescr();
errstr = (char *)alloca(FILENAME_MAX);
va_start(args, fmt);
@@ -217,8 +216,6 @@ msgNotify(char *fmt, ...)
if (isDebug())
msgDebug("Notify: %s\n", errstr);
dialog_msgbox(NULL, errstr, -1, -1, 0);
- sleep(1);
- restorescr(w);
}
/* Put up a message in a popup yes/no box and return 1 for YES, 0 for NO */
@@ -310,6 +307,7 @@ msgWeHaveOutput(char *fmt, ...)
use_helpfile(NULL);
msgDebug("Notify: %s\n", errstr);
dialog_clear_norefresh();
+ sleep(2);
dialog_msgbox(NULL, errstr, -1, -1, 0);
restorescr(w);
}
diff --git a/usr.sbin/sysinstall/network.c b/usr.sbin/sysinstall/network.c
index b92e37b..5e064a7 100644
--- a/usr.sbin/sysinstall/network.c
+++ b/usr.sbin/sysinstall/network.c
@@ -70,9 +70,12 @@ mediaInitNetwork(Device *dev)
}
}
+ w = savescr();
+ dialog_clear_norefresh();
+
/* Old PPP process lying around? */
if (pppPID) {
- msgNotify("Killing previous PPP process %d.", pppPID);
+ msgConfirm("Killing previous PPP process %d.", pppPID);
kill(pppPID, SIGTERM);
pppPID = 0;
}
@@ -88,8 +91,6 @@ mediaInitNetwork(Device *dev)
char *val;
char attach[256];
- w = savescr();
- dialog_clear_norefresh();
/* Cheesy slip attach */
snprintf(attach, 256, "slattach -a -h -l -s 9600 %s", dev->devname);
val = msgGetInput(attach,
@@ -131,7 +132,7 @@ mediaInitNetwork(Device *dev)
}
else if (!strcmp(cp, "DHCP"))
goto bail;
- msgNotify("ifconfig %s %s", dev->name, cp);
+ msgDebug("ifconfig %s %s", dev->name, cp);
i = vsystem("ifconfig %s %s", dev->name, cp);
if (i) {
msgConfirm("Unable to configure the %s interface!\n"
@@ -145,7 +146,7 @@ mediaInitNetwork(Device *dev)
"not on your local network");
}
else {
- msgNotify("Adding default route to %s.", rp);
+ msgDebug("Adding default route to %s.", rp);
vsystem("route -n add default %s", rp);
}
bail:
@@ -173,18 +174,18 @@ mediaShutdownNetwork(Device *dev)
cp = variable_get(ifconfig);
if (!cp)
return;
- msgNotify("ifconfig %s down", dev->name);
+ msgDebug("ifconfig %s down", dev->name);
i = vsystem("ifconfig %s down", dev->name);
if (i)
msgConfirm("Warning: Unable to down the %s interface properly", dev->name);
cp = variable_get(VAR_GATEWAY);
if (cp) {
- msgNotify("Deleting default route.");
+ msgDebug("Deleting default route.");
vsystem("route -n delete default");
}
}
else if (pppPID) {
- msgNotify("Killing previous PPP process %d.", pppPID);
+ msgConfirm("Killing previous PPP process %d.", pppPID);
kill(pppPID, SIGTERM);
pppPID = 0;
}
diff --git a/usr.sbin/sysinstall/nfs.c b/usr.sbin/sysinstall/nfs.c
index 53b3f42..f9a5572 100644
--- a/usr.sbin/sysinstall/nfs.c
+++ b/usr.sbin/sysinstall/nfs.c
@@ -48,6 +48,7 @@ Boolean
mediaInitNFS(Device *dev)
{
Device *netDevice = (Device *)dev->private;
+ WINDOW *w = savescr();
if (NFSMounted)
return TRUE;
@@ -65,11 +66,13 @@ mediaInitNFS(Device *dev)
msgConfirm("Error mounting %s on %s: %s.", dev->name, mountpoint, strerror(errno));
if (netDevice)
netDevice->shutdown(netDevice);
+ restorescr(w);
return FALSE;
}
NFSMounted = TRUE;
if (isDebug())
msgDebug("Mounted NFS device %s onto %s\n", dev->name, mountpoint);
+ restorescr(w);
return TRUE;
}
@@ -85,7 +88,7 @@ mediaShutdownNFS(Device *dev)
if (!NFSMounted)
return;
- msgNotify("Unmounting NFS partition on %s", mountpoint);
+ msgDebug("Unmounting NFS partition on %s", mountpoint);
if (unmount(mountpoint, MNT_FORCE) != 0)
msgConfirm("Could not unmount the NFS partition: %s", strerror(errno));
NFSMounted = FALSE;
diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c
index e11a2c7..4af188a 100644
--- a/usr.sbin/sysinstall/package.c
+++ b/usr.sbin/sysinstall/package.c
@@ -157,6 +157,7 @@ package_extract(Device *dev, char *name, Boolean depended)
if (fp) {
int i = 0, tot, pfd[2];
pid_t pid;
+ WINDOW *w = savescr();
sigpipe_caught = FALSE;
signal(SIGPIPE, catch_pipe);
@@ -176,7 +177,6 @@ package_extract(Device *dev, char *name, Boolean depended)
}
else {
char buf[BUFSIZ];
- WINDOW *w = savescr();
struct timeval start, stop;
close(pfd[0]);
diff --git a/usr.sbin/sysinstall/system.c b/usr.sbin/sysinstall/system.c
index c03d211..dfe3889 100644
--- a/usr.sbin/sysinstall/system.c
+++ b/usr.sbin/sysinstall/system.c
@@ -399,8 +399,11 @@ systemCreateHoloshell(void)
exit(1);
}
else {
+ WINDOW *w = savescr();
+
msgNotify("Starting an emergency holographic shell on VTY4");
sleep(2);
+ restorescr(w);
}
}
}
diff --git a/usr.sbin/sysinstall/tape.c b/usr.sbin/sysinstall/tape.c
index 53518ef..256fe95 100644
--- a/usr.sbin/sysinstall/tape.c
+++ b/usr.sbin/sysinstall/tape.c
@@ -68,6 +68,8 @@ mediaGetTape(Device *dev, char *file, Boolean probe)
int i;
if (!tapeInitted) {
+ WINDOW *w = savescr();
+
msgDebug("Tape init routine called for %s (private dir is %s)\n", dev->name, dev->private);
Mkdir(dev->private);
if (chdir(dev->private)) {
@@ -88,8 +90,10 @@ mediaGetTape(Device *dev, char *file, Boolean probe)
else {
msgConfirm("Tape extract command failed with status %d!\n"
"Unable to use tape media.", i);
+ restorescr(w);
return (FILE *)IO_ERROR;
}
+ restorescr(w);
}
sprintf(buf, "%s/%s", (char *)dev->private, file);
@@ -113,7 +117,7 @@ mediaShutdownTape(Device *dev)
if (!tapeInitted)
return;
if (file_readable((char *)dev->private)) {
- msgNotify("Cleaning up results of tape extract in %s..",
+ msgDebug("Cleaning up results of tape extract in %s..",
(char *)dev->private);
(void)vsystem("rm -rf %s", (char *)dev->private);
}
diff --git a/usr.sbin/sysinstall/tcpip.c b/usr.sbin/sysinstall/tcpip.c
index 28273f3..453fe5f 100644
--- a/usr.sbin/sysinstall/tcpip.c
+++ b/usr.sbin/sysinstall/tcpip.c
@@ -205,6 +205,7 @@ tcpOpenDialog(Device *devp)
char *tmp;
char title[80];
+ save = savescr();
/* Initialise vars from previous device values */
if (devp->private) {
DevInfo *di = (DevInfo *)devp->private;
@@ -282,7 +283,6 @@ tcpOpenDialog(Device *devp)
SAFE_STRCPY(nameserver, tmp);
}
- save = savescr();
/* If non-interactive, jump straight over the dialog crap and into config section */
if (variable_get(VAR_NONINTERACTIVE) &&
!variable_get(VAR_NETINTERACTIVE)) {
OpenPOWER on IntegriCloud