In retrospect, msgNotify() should leave its contents on the screen
longer to give the user something to look at while things are happening. Change it to do so and insert the appropriate screen saves elsewhere.
This commit is contained in:
parent
b2296f0762
commit
38d1286e58
@ -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;
|
||||
}
|
||||
|
@ -438,6 +438,7 @@ deviceGetAll(void)
|
||||
}
|
||||
free(names);
|
||||
}
|
||||
dialog_clear_norefresh();
|
||||
}
|
||||
|
||||
/* Rescan all devices, after closing previous set - convenience function */
|
||||
|
@ -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 */
|
||||
|
@ -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)
|
||||
|
@ -961,6 +961,7 @@ installFilesystems(dialogMenuItem *self)
|
||||
|
||||
command_sort();
|
||||
command_execute();
|
||||
dialog_clear_norefresh();
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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]);
|
||||
|
@ -399,8 +399,11 @@ systemCreateHoloshell(void)
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
WINDOW *w = savescr();
|
||||
|
||||
msgNotify("Starting an emergency holographic shell on VTY4");
|
||||
sleep(2);
|
||||
restorescr(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
@ -438,6 +438,7 @@ deviceGetAll(void)
|
||||
}
|
||||
free(names);
|
||||
}
|
||||
dialog_clear_norefresh();
|
||||
}
|
||||
|
||||
/* Rescan all devices, after closing previous set - convenience function */
|
||||
|
@ -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 */
|
||||
|
@ -961,6 +961,7 @@ installFilesystems(dialogMenuItem *self)
|
||||
|
||||
command_sort();
|
||||
command_execute();
|
||||
dialog_clear_norefresh();
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -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",
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -399,8 +399,11 @@ systemCreateHoloshell(void)
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
WINDOW *w = savescr();
|
||||
|
||||
msgNotify("Starting an emergency holographic shell on VTY4");
|
||||
sleep(2);
|
||||
restorescr(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -438,6 +438,7 @@ deviceGetAll(void)
|
||||
}
|
||||
free(names);
|
||||
}
|
||||
dialog_clear_norefresh();
|
||||
}
|
||||
|
||||
/* Rescan all devices, after closing previous set - convenience function */
|
||||
|
@ -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 */
|
||||
|
@ -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)
|
||||
|
@ -961,6 +961,7 @@ installFilesystems(dialogMenuItem *self)
|
||||
|
||||
command_sort();
|
||||
command_execute();
|
||||
dialog_clear_norefresh();
|
||||
return DITEM_SUCCESS;
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
@ -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",
|
||||
|
@ -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
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
@ -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;
|
||||
|
@ -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]);
|
||||
|
@ -399,8 +399,11 @@ systemCreateHoloshell(void)
|
||||
exit(1);
|
||||
}
|
||||
else {
|
||||
WINDOW *w = savescr();
|
||||
|
||||
msgNotify("Starting an emergency holographic shell on VTY4");
|
||||
sleep(2);
|
||||
restorescr(w);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -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);
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user