summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-05-29 01:43:20 +0000
committerjkh <jkh@FreeBSD.org>1995-05-29 01:43:20 +0000
commit79d387438f1dada6d7e6f916cbf9e914be3a0c3c (patch)
tree7b698b19bb460137d09987351c395e22ee5cb6ae
parent570995b82cb452800f4827f23ce59bc9dd8cf989 (diff)
downloadFreeBSD-src-79d387438f1dada6d7e6f916cbf9e914be3a0c3c.zip
FreeBSD-src-79d387438f1dada6d7e6f916cbf9e914be3a0c3c.tar.gz
Make the emergency holographic shell (on VTY4) actually work with job
control and signals and such. Thanks, Gary! Clean up some miscellaneous bogons for Poul.
-rw-r--r--release/sysinstall/Makefile4
-rw-r--r--release/sysinstall/menus.c4
-rw-r--r--release/sysinstall/msg.c11
-rw-r--r--release/sysinstall/network.c16
-rw-r--r--usr.sbin/sade/Makefile4
-rw-r--r--usr.sbin/sade/menus.c4
-rw-r--r--usr.sbin/sade/msg.c11
-rw-r--r--usr.sbin/sysinstall/Makefile4
-rw-r--r--usr.sbin/sysinstall/menus.c4
-rw-r--r--usr.sbin/sysinstall/msg.c11
-rw-r--r--usr.sbin/sysinstall/network.c16
11 files changed, 57 insertions, 32 deletions
diff --git a/release/sysinstall/Makefile b/release/sysinstall/Makefile
index ebeacc1..481ce83 100644
--- a/release/sysinstall/Makefile
+++ b/release/sysinstall/Makefile
@@ -13,14 +13,14 @@ SRCS= attr.c cdrom.c command.c config.c crc.c decode.c devices.c disks.c dist.c
CFLAGS+= -Wall -g -I${.CURDIR}/../libdisk \
-I${.CURDIR}/../../gnu/lib/libdialog
-LDADD= -ldialog -lncurses -lmytinfo
+LDADD= -ldialog -lncurses -lmytinfo -lutil
.if exists(${.CURDIR}/../libdisk/obj)
LDADD+= -L${.CURDIR}/../libdisk/obj -ldisk
.else
LDADD+= -L${.CURDIR}/../libdisk -ldisk
.endif
-DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO}
+DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL}
.if exists(${.CURDIR}/../../sys/i386/boot/biosboot/obj)
BOOTS=${.CURDIR}/../../sys/i386/boot/biosboot/obj
diff --git a/release/sysinstall/menus.c b/release/sysinstall/menus.c
index 9a11719..83b47c2 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.35 1995/05/28 09:31:37 jkh Exp $
+ * $Id: menus.c,v 1.36 1995/05/28 23:12:07 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -723,7 +723,7 @@ close to you to have your system time syncronized accordingly.",
{ "U.S. West Coast", "clepsydra.dec.com (GOES clock)",
DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
{ "U.S. West Coast", "clock.llnl.gov (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
+ DMENU_SET_VARIABLE, "ntpdate=clock.llnl.gov", 0, 0 },
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
DMENU_SET_VARIABLE, "ntpdate=ncar.ucar.edu", 0, 0 },
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
diff --git a/release/sysinstall/msg.c b/release/sysinstall/msg.c
index 3459e7e..e9b2ae6 100644
--- a/release/sysinstall/msg.c
+++ b/release/sysinstall/msg.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $
+ * $Id: msg.c,v 1.25 1995/05/29 00:50:04 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -207,7 +207,8 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ msgDebug("Switching back to VTY 0\n");
+ ioctl(0, VT_RELDISP, 1);
msgInfo(NULL);
}
dialog_notify(errstr);
@@ -253,7 +254,8 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ ioctl(0, VT_RELDISP, 1); /* Switch back */
+ msgDebug("User decision requested (type ALT-F1)\n");
msgInfo(NULL);
}
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
@@ -286,7 +288,8 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0';
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ msgDebug("Switching back to VTY 0\n");
+ ioctl(0, VT_RELDISP, 1); /* Switch back */
msgInfo(NULL);
}
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
diff --git a/release/sysinstall/network.c b/release/sysinstall/network.c
index db7330d..83e849b 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.2 1995/05/28 03:05:00 jkh Exp $
+ * $Id: network.c,v 1.3 1995/05/28 09:31:38 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -139,7 +139,7 @@ configRoutedFlags(char *str)
static Boolean
startPPP(Device *devp)
{
- int fd;
+ int fd, fd2;
FILE *fp;
char *val;
char myaddr[16], provider[16];
@@ -150,8 +150,16 @@ startPPP(Device *devp)
Mkdir("/var/log", NULL);
Mkdir("/var/spool/lock", NULL);
Mkdir("/etc/ppp", NULL);
- vsystem("touch /etc/ppp/ppp.linkup; chmod +x /etc/ppp/ppp.linkup");
- vsystem("touch /etc/ppp/ppp.secret; chmod +x /etc/ppp/ppp.secret");
+ fd2 = open("/etc/ppp/ppp.linkup", O_CREAT);
+ if (fd2 != -1) {
+ fchmod(fd2, 0755);
+ close(fd2);
+ }
+ fd2 = open("/etc/ppp/ppp.secret", O_CREAT);
+ if (fd2 != -1) {
+ fchmod(fd2, 0755);
+ close(fd2);
+ }
fp = fopen("/etc/ppp/ppp.conf", "w");
if (!fp) {
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
diff --git a/usr.sbin/sade/Makefile b/usr.sbin/sade/Makefile
index ebeacc1..481ce83 100644
--- a/usr.sbin/sade/Makefile
+++ b/usr.sbin/sade/Makefile
@@ -13,14 +13,14 @@ SRCS= attr.c cdrom.c command.c config.c crc.c decode.c devices.c disks.c dist.c
CFLAGS+= -Wall -g -I${.CURDIR}/../libdisk \
-I${.CURDIR}/../../gnu/lib/libdialog
-LDADD= -ldialog -lncurses -lmytinfo
+LDADD= -ldialog -lncurses -lmytinfo -lutil
.if exists(${.CURDIR}/../libdisk/obj)
LDADD+= -L${.CURDIR}/../libdisk/obj -ldisk
.else
LDADD+= -L${.CURDIR}/../libdisk -ldisk
.endif
-DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO}
+DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL}
.if exists(${.CURDIR}/../../sys/i386/boot/biosboot/obj)
BOOTS=${.CURDIR}/../../sys/i386/boot/biosboot/obj
diff --git a/usr.sbin/sade/menus.c b/usr.sbin/sade/menus.c
index 9a11719..83b47c2 100644
--- a/usr.sbin/sade/menus.c
+++ b/usr.sbin/sade/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.35 1995/05/28 09:31:37 jkh Exp $
+ * $Id: menus.c,v 1.36 1995/05/28 23:12:07 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -723,7 +723,7 @@ close to you to have your system time syncronized accordingly.",
{ "U.S. West Coast", "clepsydra.dec.com (GOES clock)",
DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
{ "U.S. West Coast", "clock.llnl.gov (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
+ DMENU_SET_VARIABLE, "ntpdate=clock.llnl.gov", 0, 0 },
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
DMENU_SET_VARIABLE, "ntpdate=ncar.ucar.edu", 0, 0 },
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
diff --git a/usr.sbin/sade/msg.c b/usr.sbin/sade/msg.c
index 3459e7e..e9b2ae6 100644
--- a/usr.sbin/sade/msg.c
+++ b/usr.sbin/sade/msg.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $
+ * $Id: msg.c,v 1.25 1995/05/29 00:50:04 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -207,7 +207,8 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ msgDebug("Switching back to VTY 0\n");
+ ioctl(0, VT_RELDISP, 1);
msgInfo(NULL);
}
dialog_notify(errstr);
@@ -253,7 +254,8 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ ioctl(0, VT_RELDISP, 1); /* Switch back */
+ msgDebug("User decision requested (type ALT-F1)\n");
msgInfo(NULL);
}
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
@@ -286,7 +288,8 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0';
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ msgDebug("Switching back to VTY 0\n");
+ ioctl(0, VT_RELDISP, 1); /* Switch back */
msgInfo(NULL);
}
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
diff --git a/usr.sbin/sysinstall/Makefile b/usr.sbin/sysinstall/Makefile
index ebeacc1..481ce83 100644
--- a/usr.sbin/sysinstall/Makefile
+++ b/usr.sbin/sysinstall/Makefile
@@ -13,14 +13,14 @@ SRCS= attr.c cdrom.c command.c config.c crc.c decode.c devices.c disks.c dist.c
CFLAGS+= -Wall -g -I${.CURDIR}/../libdisk \
-I${.CURDIR}/../../gnu/lib/libdialog
-LDADD= -ldialog -lncurses -lmytinfo
+LDADD= -ldialog -lncurses -lmytinfo -lutil
.if exists(${.CURDIR}/../libdisk/obj)
LDADD+= -L${.CURDIR}/../libdisk/obj -ldisk
.else
LDADD+= -L${.CURDIR}/../libdisk -ldisk
.endif
-DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO}
+DPADD= ${LIBDIALOG} ${LIBNCURSES} ${LIBMYTINFO} ${LIBUTIL}
.if exists(${.CURDIR}/../../sys/i386/boot/biosboot/obj)
BOOTS=${.CURDIR}/../../sys/i386/boot/biosboot/obj
diff --git a/usr.sbin/sysinstall/menus.c b/usr.sbin/sysinstall/menus.c
index 9a11719..83b47c2 100644
--- a/usr.sbin/sysinstall/menus.c
+++ b/usr.sbin/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.35 1995/05/28 09:31:37 jkh Exp $
+ * $Id: menus.c,v 1.36 1995/05/28 23:12:07 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -723,7 +723,7 @@ close to you to have your system time syncronized accordingly.",
{ "U.S. West Coast", "clepsydra.dec.com (GOES clock)",
DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
{ "U.S. West Coast", "clock.llnl.gov (WWVB clock)",
- DMENU_SET_VARIABLE, "ntpdate=clepsydra.dec.com", 0, 0 },
+ DMENU_SET_VARIABLE, "ntpdate=clock.llnl.gov", 0, 0 },
{ "U.S. Midwest", "ncar.ucar.edu (WWVB clock)",
DMENU_SET_VARIABLE, "ntpdate=ncar.ucar.edu", 0, 0 },
{ "U.S. Pacific", "chantry.hawaii.net (WWV/H clock)",
diff --git a/usr.sbin/sysinstall/msg.c b/usr.sbin/sysinstall/msg.c
index 3459e7e..e9b2ae6 100644
--- a/usr.sbin/sysinstall/msg.c
+++ b/usr.sbin/sysinstall/msg.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $
+ * $Id: msg.c,v 1.25 1995/05/29 00:50:04 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -207,7 +207,8 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ msgDebug("Switching back to VTY 0\n");
+ ioctl(0, VT_RELDISP, 1);
msgInfo(NULL);
}
dialog_notify(errstr);
@@ -253,7 +254,8 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL);
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ ioctl(0, VT_RELDISP, 1); /* Switch back */
+ msgDebug("User decision requested (type ALT-F1)\n");
msgInfo(NULL);
}
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
@@ -286,7 +288,8 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0';
w = dupwin(newscr);
if (OnVTY) {
- ioctl(0, VT_RELDISP, 0); /* Switch back */
+ msgDebug("Switching back to VTY 0\n");
+ ioctl(0, VT_RELDISP, 1); /* Switch back */
msgInfo(NULL);
}
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);
diff --git a/usr.sbin/sysinstall/network.c b/usr.sbin/sysinstall/network.c
index db7330d..83e849b 100644
--- a/usr.sbin/sysinstall/network.c
+++ b/usr.sbin/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.2 1995/05/28 03:05:00 jkh Exp $
+ * $Id: network.c,v 1.3 1995/05/28 09:31:38 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -139,7 +139,7 @@ configRoutedFlags(char *str)
static Boolean
startPPP(Device *devp)
{
- int fd;
+ int fd, fd2;
FILE *fp;
char *val;
char myaddr[16], provider[16];
@@ -150,8 +150,16 @@ startPPP(Device *devp)
Mkdir("/var/log", NULL);
Mkdir("/var/spool/lock", NULL);
Mkdir("/etc/ppp", NULL);
- vsystem("touch /etc/ppp/ppp.linkup; chmod +x /etc/ppp/ppp.linkup");
- vsystem("touch /etc/ppp/ppp.secret; chmod +x /etc/ppp/ppp.secret");
+ fd2 = open("/etc/ppp/ppp.linkup", O_CREAT);
+ if (fd2 != -1) {
+ fchmod(fd2, 0755);
+ close(fd2);
+ }
+ fd2 = open("/etc/ppp/ppp.secret", O_CREAT);
+ if (fd2 != -1) {
+ fchmod(fd2, 0755);
+ close(fd2);
+ }
fp = fopen("/etc/ppp/ppp.conf", "w");
if (!fp) {
msgConfirm("Couldn't open /etc/ppp/ppp.conf file! This isn't going to work");
OpenPOWER on IntegriCloud