aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/sysinstall/network.c
diff options
context:
space:
mode:
authorJordan K. Hubbard <jkh@FreeBSD.org>1999-12-14 04:25:29 +0000
committerJordan K. Hubbard <jkh@FreeBSD.org>1999-12-14 04:25:29 +0000
commit7025aeb16e091cf9515535424d0532b53c618b83 (patch)
treea4fa2148685a8fd9c12ca7648603d5499e521f49 /usr.sbin/sysinstall/network.c
parent34fa0973611c929a22ea016ed691c4e152ba0054 (diff)
downloadsrc-7025aeb16e091cf9515535424d0532b53c618b83.tar.gz
src-7025aeb16e091cf9515535424d0532b53c618b83.zip
Completely rip-out and redesign sysinstall's refresh model as well
as redoing all the menus to have proper, or at least non-hallucinogenic, keyboard accelerators. This requires my recent update to libdialog to work properly and will probably also exhibit some other "interesting" behavior while the last few missing screen clears are found (which is why I'm not going to MFC immediately). At least now, however, sysinstall does not gratuitously redraw random screens at the drop of a hat and drive serial console installers out of their minds.
Notes
Notes: svn path=/head/; revision=54587
Diffstat (limited to 'usr.sbin/sysinstall/network.c')
-rw-r--r--usr.sbin/sysinstall/network.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/usr.sbin/sysinstall/network.c b/usr.sbin/sysinstall/network.c
index adffa4dd9ae6..b92e37bac599 100644
--- a/usr.sbin/sysinstall/network.c
+++ b/usr.sbin/sysinstall/network.c
@@ -55,7 +55,8 @@ mediaInitNetwork(Device *dev)
int i;
char *rp;
char *cp, ifconfig[255];
-
+ WINDOW *w;
+
if (!RunningAsInit || networkInitialized)
return TRUE;
@@ -87,6 +88,7 @@ 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);
@@ -101,6 +103,7 @@ mediaInitNetwork(Device *dev)
"ready, press [ENTER] to execute it.");
if (!val) {
msgConfirm("slattach command was empty. Try again!");
+ restorescr(w);
return FALSE;
}
else
@@ -113,8 +116,10 @@ mediaInitNetwork(Device *dev)
if (vsystem(attach)) {
msgConfirm("slattach returned a bad status! Please verify that\n"
"the command is correct and try this operation again.");
+ restorescr(w);
return FALSE;
}
+ restorescr(w);
}
snprintf(ifconfig, 255, "%s%s", VAR_IFCONFIG, dev->name);
@@ -196,7 +201,8 @@ startPPP(Device *devp)
pid_t pid = 0;
char myaddr[16], provider[16], speed[16], authname[32], authkey[16];
char phone[16];
-
+ WINDOW *w = savescr();
+
/* These are needed to make ppp work */
Mkdir("/var/log");
Mkdir("/var/run");
@@ -252,6 +258,7 @@ startPPP(Device *devp)
fp = fopen("/dev/stderr", "w");
if (!fp) {
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
+ restorescr(w);
return 0;
}
authname[0] = '\0';
@@ -293,6 +300,7 @@ startPPP(Device *devp)
if (!Fake && !file_readable("/dev/tun0") && mknod("/dev/tun0", 0600 | S_IFCHR, makedev(52, 0))) {
msgConfirm("Warning: No /dev/tun0 device. PPP will not work!");
+ restorescr(w);
return 0;
}
@@ -339,5 +347,6 @@ startPPP(Device *devp)
"DO NOT PRESS [ENTER] HERE UNTIL THE CONNECTION IS FULLY\n"
"ESTABLISHED!");
}
+ restorescr(w);
return pid;
}