summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sysinstall/termcap.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-03-21 09:30:18 +0000
committerjkh <jkh@FreeBSD.org>1996-03-21 09:30:18 +0000
commit6d0196f036971151d9364b27f12ebb17441e71b4 (patch)
tree3c22228d8268134d1d6b0773e91ba58c62411316 /usr.sbin/sysinstall/termcap.c
parent96f30bacb477cdae92df7a1126b281be8894bf79 (diff)
downloadFreeBSD-src-6d0196f036971151d9364b27f12ebb17441e71b4.zip
FreeBSD-src-6d0196f036971151d9364b27f12ebb17441e71b4.tar.gz
Major enhancements to the package adder (next step is to use the new dialog
functions to make the menus far less klunky, but one thing at a time). Fix bug that had debug output spewing uselessly on vty2 when running multiuser.
Diffstat (limited to 'usr.sbin/sysinstall/termcap.c')
-rw-r--r--usr.sbin/sysinstall/termcap.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/usr.sbin/sysinstall/termcap.c b/usr.sbin/sysinstall/termcap.c
index 7256b53c..30efe0c 100644
--- a/usr.sbin/sysinstall/termcap.c
+++ b/usr.sbin/sysinstall/termcap.c
@@ -50,11 +50,13 @@ set_termcap(void)
else {
int i, on;
- DebugFD = open("/dev/ttyv1", O_WRONLY);
- on = 1;
- i = ioctl(DebugFD, TIOCCONS, (char *)&on);
- msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
- OnVTY = TRUE;
+ if (getpid() == 1) {
+ DebugFD = open("/dev/ttyv1", O_WRONLY);
+ on = 1;
+ i = ioctl(DebugFD, TIOCCONS, (char *)&on);
+ msgDebug("ioctl(%d, TIOCCONS, NULL) = %d (%s)\n", DebugFD, i, !i ? "success" : strerror(errno));
+ OnVTY = TRUE;
+ }
if (ColorDisplay) {
if (!term) {
if (setenv("TERM", "cons25", 1) < 0)
OpenPOWER on IntegriCloud