Shrink the boot floppy by removing all extraneous stuff. Also increase

number of inodes.

Fix various bugs reported by Poul.  Implement VTY switching.
This commit is contained in:
Jordan K. Hubbard 1995-05-29 00:50:05 +00:00
parent 15671a7ba8
commit fdb4b4b383
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=8825
21 changed files with 77 additions and 78 deletions

View File

@ -1,4 +1,4 @@
# $Id: Makefile,v 1.185 1995/05/27 21:07:13 jkh Exp $ # $Id: Makefile,v 1.186 1995/05/28 07:04:36 phk Exp $
# #
# How to roll a release: # How to roll a release:
# #
@ -37,7 +37,7 @@ FDSIZE= 1200
FDLABEL= fd1200 FDLABEL= fd1200
FDINODE= 4300 FDINODE= 4300
NEWFSARGS= -c 80 -b 4096 -f 512 -i 4300 -m 0 -t 0 -u 0 \ NEWFSARGS= -c 80 -b 4096 -f 512 -i 4000 -m 0 -t 0 -u 0 \
-o space -T ${FDLABEL} -o space -T ${FDLABEL}
ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 - ZIPNSPLIT= gzip --no-name -9 -c | split -b 240640 -

View File

@ -1,16 +1,14 @@
# $Id: boot_crunch.conf,v 1.16 1995/05/27 11:18:52 jkh Exp $ # $Id: boot_crunch.conf,v 1.17 1995/05/27 20:49:57 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs ls cat df sh pwd find progs sh find
progs mount mount_cd9660 mount_msdos mount_nfs ping ppp umount progs ping ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
ln gzip gunzip ln gzip gunzip
ln gzip zcat ln gzip zcat
ln sh -sh ln sh -sh
# ln sysinstall oinit
# ln test [
libs -ll -ledit -lutil -lkvm libs -ll -ledit -lutil -lkvm
libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk

View File

@ -1,16 +1,14 @@
# $Id: boot_crunch.conf,v 1.16 1995/05/27 11:18:52 jkh Exp $ # $Id: boot_crunch.conf,v 1.17 1995/05/27 20:49:57 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs ls cat df sh pwd find progs sh find
progs mount mount_cd9660 mount_msdos mount_nfs ping ppp umount progs ping ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
ln gzip gunzip ln gzip gunzip
ln gzip zcat ln gzip zcat
ln sh -sh ln sh -sh
# ln sysinstall oinit
# ln test [
libs -ll -ledit -lutil -lkvm libs -ll -ledit -lutil -lkvm
libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk

View File

@ -1,16 +1,14 @@
# $Id: boot_crunch.conf,v 1.16 1995/05/27 11:18:52 jkh Exp $ # $Id: boot_crunch.conf,v 1.17 1995/05/27 20:49:57 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs ls cat df sh pwd find progs sh find
progs mount mount_cd9660 mount_msdos mount_nfs ping ppp umount progs ping ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
ln gzip gunzip ln gzip gunzip
ln gzip zcat ln gzip zcat
ln sh -sh ln sh -sh
# ln sysinstall oinit
# ln test [
libs -ll -ledit -lutil -lkvm libs -ll -ledit -lutil -lkvm
libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk

View File

@ -1,16 +1,14 @@
# $Id: boot_crunch.conf,v 1.16 1995/05/27 11:18:52 jkh Exp $ # $Id: boot_crunch.conf,v 1.17 1995/05/27 20:49:57 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs ls cat df sh pwd find progs sh find
progs mount mount_cd9660 mount_msdos mount_nfs ping ppp umount progs ping ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
ln gzip gunzip ln gzip gunzip
ln gzip zcat ln gzip zcat
ln sh -sh ln sh -sh
# ln sysinstall oinit
# ln test [
libs -ll -ledit -lutil -lkvm libs -ll -ledit -lutil -lkvm
libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk

View File

@ -1,16 +1,14 @@
# $Id: boot_crunch.conf,v 1.16 1995/05/27 11:18:52 jkh Exp $ # $Id: boot_crunch.conf,v 1.17 1995/05/27 20:49:57 jkh Exp $
srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin srcdirs /usr/src/bin /usr/src/sbin /usr/src/release /usr/src/usr.bin
srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386 srcdirs /usr/src/gnu/usr.bin /usr/src/usr.sbin /usr/src/sbin/i386
progs ls cat df sh pwd find progs sh find
progs mount mount_cd9660 mount_msdos mount_nfs ping ppp umount progs ping ppp
progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach progs sysinstall newfs gzip cpio bad144 fsck ifconfig route slattach
ln gzip gunzip ln gzip gunzip
ln gzip zcat ln gzip zcat
ln sh -sh ln sh -sh
# ln sysinstall oinit
# ln test [
libs -ll -ledit -lutil -lkvm libs -ll -ledit -lutil -lkvm
libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk libs -ldialog -lncurses -lmytinfo -L/usr/src/release/libdisk/obj -ldisk

View File

@ -1,4 +1,4 @@
# $Id: root_crunch.conf,v 1.2 1995/05/26 21:15:50 jkh Exp $ # $Id: root_crunch.conf,v 1.3 1995/05/27 20:49:59 jkh Exp $
# first, we list the source dirs that our programs reside in. These are # first, we list the source dirs that our programs reside in. These are
# searched in order listed to find the dir containing each program. # searched in order listed to find the dir containing each program.
@ -13,7 +13,7 @@ srcdirs /usr/src/usr.sbin
# /bin stuff # /bin stuff
progs chmod cksum cp date dd echo ed expr grep hostname kill ln progs ls cat df pwd chmod cksum cp date dd echo ed expr grep hostname kill ln
progs mkdir mt mv pwd rcp rm rmdir sleep stty sync test ft progs mkdir mt mv pwd rcp rm rmdir sleep stty sync test ft
ln test [ ln test [

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * generation being slated to essentially a complete rewrite.
* *
* $Id: floppy.c,v 1.2 1995/05/27 23:39:29 phk Exp $ * $Id: floppy.c,v 1.3 1995/05/28 03:04:56 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -150,7 +150,7 @@ void
mediaShutdownFloppy(Device *dev) mediaShutdownFloppy(Device *dev)
{ {
if (floppyMounted) { if (floppyMounted) {
if (vsystem("umount /mnt") != 0) if (unmount("/mnt", 0) != 0)
msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno); msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
else { else {
floppyMounted = FALSE; floppyMounted = FALSE;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: install.c,v 1.64 1995/05/28 20:28:13 jkh Exp $ * $Id: install.c,v 1.65 1995/05/28 23:12:05 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -200,6 +200,7 @@ installInitial(void)
msgDebug("Sticking a potentially helpful shell over on the 4th screen\n"); msgDebug("Sticking a potentially helpful shell over on the 4th screen\n");
if (!fork()) { if (!fork()) {
int i, fd; int i, fd;
extern int login_tty(int);
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
close(i); close(i);
@ -207,6 +208,10 @@ installInitial(void)
ioctl(0, TIOCSCTTY, &fd); ioctl(0, TIOCSCTTY, &fd);
dup2(0, 1); dup2(0, 1);
dup2(0, 2); dup2(0, 2);
if (login_tty(fd)==-1) {
msgConfirm("Can't set controlling terminal");
exit(1);
}
execlp("sh", "-sh", 0); execlp("sh", "-sh", 0);
exit(1); exit(1);
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: label.c,v 1.28 1995/05/28 20:28:15 jkh Exp $ * $Id: label.c,v 1.29 1995/05/28 23:12:06 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -348,11 +348,9 @@ print_label_chunks(void)
} }
memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name)); memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name));
/* If it's a filesystem, display the mountpoint */ /* If it's a filesystem, display the mountpoint */
if (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT) { if (label_chunk_info[i].c->private
if (label_chunk_info[i].c->private != NULL) && (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)) {
mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint; mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint;
else
mountpoint = " ";
if (label_chunk_info[i].type == PART_FAT) if (label_chunk_info[i].type == PART_FAT)
newfs = "DOS"; newfs = "DOS";
else else

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: msg.c,v 1.23 1995/05/23 02:41:15 jkh Exp $ * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -43,6 +43,8 @@
#include "sysinstall.h" #include "sysinstall.h"
#include <stdarg.h> #include <stdarg.h>
#include <sys/ioctl.h>
#include <machine/console.h>
#define VTY_STATLINE 24 #define VTY_STATLINE 24
#define TTY_STATLINE 23 #define TTY_STATLINE 23
@ -205,7 +207,7 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL); use_helpfile(NULL);
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User confirmation requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
dialog_notify(errstr); dialog_notify(errstr);
@ -251,7 +253,7 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL); use_helpfile(NULL);
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User decision requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
@ -284,7 +286,7 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0'; input_buffer[0] = '\0';
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User input requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer); rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $ * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $
* *
* Jordan Hubbard * Jordan Hubbard
* *
@ -105,9 +105,7 @@ systemShutdown(void)
int fd, on = 1; int fd, on = 1;
/* Put the console back */ /* Put the console back */
fd = open("/dev/ttyv0", O_RDONLY); ioctl(0, VT_RELDISP, 1);
if (fd != -1)
ioctl(fd, TIOCCONS, &on);
reboot(RB_HALT); reboot(RB_HALT);
} }
else else

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: install.c,v 1.64 1995/05/28 20:28:13 jkh Exp $ * $Id: install.c,v 1.65 1995/05/28 23:12:05 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -200,6 +200,7 @@ installInitial(void)
msgDebug("Sticking a potentially helpful shell over on the 4th screen\n"); msgDebug("Sticking a potentially helpful shell over on the 4th screen\n");
if (!fork()) { if (!fork()) {
int i, fd; int i, fd;
extern int login_tty(int);
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
close(i); close(i);
@ -207,6 +208,10 @@ installInitial(void)
ioctl(0, TIOCSCTTY, &fd); ioctl(0, TIOCSCTTY, &fd);
dup2(0, 1); dup2(0, 1);
dup2(0, 2); dup2(0, 2);
if (login_tty(fd)==-1) {
msgConfirm("Can't set controlling terminal");
exit(1);
}
execlp("sh", "-sh", 0); execlp("sh", "-sh", 0);
exit(1); exit(1);
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: label.c,v 1.28 1995/05/28 20:28:15 jkh Exp $ * $Id: label.c,v 1.29 1995/05/28 23:12:06 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -348,11 +348,9 @@ print_label_chunks(void)
} }
memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name)); memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name));
/* If it's a filesystem, display the mountpoint */ /* If it's a filesystem, display the mountpoint */
if (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT) { if (label_chunk_info[i].c->private
if (label_chunk_info[i].c->private != NULL) && (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)) {
mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint; mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint;
else
mountpoint = " ";
if (label_chunk_info[i].type == PART_FAT) if (label_chunk_info[i].type == PART_FAT)
newfs = "DOS"; newfs = "DOS";
else else

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: msg.c,v 1.23 1995/05/23 02:41:15 jkh Exp $ * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -43,6 +43,8 @@
#include "sysinstall.h" #include "sysinstall.h"
#include <stdarg.h> #include <stdarg.h>
#include <sys/ioctl.h>
#include <machine/console.h>
#define VTY_STATLINE 24 #define VTY_STATLINE 24
#define TTY_STATLINE 23 #define TTY_STATLINE 23
@ -205,7 +207,7 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL); use_helpfile(NULL);
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User confirmation requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
dialog_notify(errstr); dialog_notify(errstr);
@ -251,7 +253,7 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL); use_helpfile(NULL);
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User decision requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
@ -284,7 +286,7 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0'; input_buffer[0] = '\0';
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User input requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer); rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $ * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $
* *
* Jordan Hubbard * Jordan Hubbard
* *
@ -105,9 +105,7 @@ systemShutdown(void)
int fd, on = 1; int fd, on = 1;
/* Put the console back */ /* Put the console back */
fd = open("/dev/ttyv0", O_RDONLY); ioctl(0, VT_RELDISP, 1);
if (fd != -1)
ioctl(fd, TIOCCONS, &on);
reboot(RB_HALT); reboot(RB_HALT);
} }
else else

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next * This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite. * generation being slated to essentially a complete rewrite.
* *
* $Id: floppy.c,v 1.2 1995/05/27 23:39:29 phk Exp $ * $Id: floppy.c,v 1.3 1995/05/28 03:04:56 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -150,7 +150,7 @@ void
mediaShutdownFloppy(Device *dev) mediaShutdownFloppy(Device *dev)
{ {
if (floppyMounted) { if (floppyMounted) {
if (vsystem("umount /mnt") != 0) if (unmount("/mnt", 0) != 0)
msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno); msgDebug("Umount of floppy on /mnt failed: %s (%d)\n", strerror(errno), errno);
else { else {
floppyMounted = FALSE; floppyMounted = FALSE;

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: install.c,v 1.64 1995/05/28 20:28:13 jkh Exp $ * $Id: install.c,v 1.65 1995/05/28 23:12:05 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -200,6 +200,7 @@ installInitial(void)
msgDebug("Sticking a potentially helpful shell over on the 4th screen\n"); msgDebug("Sticking a potentially helpful shell over on the 4th screen\n");
if (!fork()) { if (!fork()) {
int i, fd; int i, fd;
extern int login_tty(int);
for (i = 0; i < 64; i++) for (i = 0; i < 64; i++)
close(i); close(i);
@ -207,6 +208,10 @@ installInitial(void)
ioctl(0, TIOCSCTTY, &fd); ioctl(0, TIOCSCTTY, &fd);
dup2(0, 1); dup2(0, 1);
dup2(0, 2); dup2(0, 2);
if (login_tty(fd)==-1) {
msgConfirm("Can't set controlling terminal");
exit(1);
}
execlp("sh", "-sh", 0); execlp("sh", "-sh", 0);
exit(1); exit(1);
} }

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: label.c,v 1.28 1995/05/28 20:28:15 jkh Exp $ * $Id: label.c,v 1.29 1995/05/28 23:12:06 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -348,11 +348,9 @@ print_label_chunks(void)
} }
memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name)); memcpy(onestr + PART_PART_COL, label_chunk_info[i].c->name, strlen(label_chunk_info[i].c->name));
/* If it's a filesystem, display the mountpoint */ /* If it's a filesystem, display the mountpoint */
if (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT) { if (label_chunk_info[i].c->private
if (label_chunk_info[i].c->private != NULL) && (label_chunk_info[i].type == PART_FILESYSTEM || label_chunk_info[i].type == PART_FAT)) {
mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint; mountpoint = ((PartInfo *)label_chunk_info[i].c->private)->mountpoint;
else
mountpoint = " ";
if (label_chunk_info[i].type == PART_FAT) if (label_chunk_info[i].type == PART_FAT)
newfs = "DOS"; newfs = "DOS";
else else

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: msg.c,v 1.23 1995/05/23 02:41:15 jkh Exp $ * $Id: msg.c,v 1.24 1995/05/24 09:00:56 jkh Exp $
* *
* Copyright (c) 1995 * Copyright (c) 1995
* Jordan Hubbard. All rights reserved. * Jordan Hubbard. All rights reserved.
@ -43,6 +43,8 @@
#include "sysinstall.h" #include "sysinstall.h"
#include <stdarg.h> #include <stdarg.h>
#include <sys/ioctl.h>
#include <machine/console.h>
#define VTY_STATLINE 24 #define VTY_STATLINE 24
#define TTY_STATLINE 23 #define TTY_STATLINE 23
@ -205,7 +207,7 @@ msgConfirm(char *fmt, ...)
use_helpfile(NULL); use_helpfile(NULL);
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User confirmation requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
dialog_notify(errstr); dialog_notify(errstr);
@ -251,7 +253,7 @@ msgYesNo(char *fmt, ...)
use_helpfile(NULL); use_helpfile(NULL);
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User decision requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1); ret = dialog_yesno("User Confirmation Requested", errstr, -1, -1);
@ -284,7 +286,7 @@ msgGetInput(char *buf, char *fmt, ...)
input_buffer[0] = '\0'; input_buffer[0] = '\0';
w = dupwin(newscr); w = dupwin(newscr);
if (OnVTY) { if (OnVTY) {
msgDebug("User input requested (type ALT-F1)\n"); ioctl(0, VT_RELDISP, 0); /* Switch back */
msgInfo(NULL); msgInfo(NULL);
} }
rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer); rval = dialog_inputbox("Value Required", errstr, -1, -1, input_buffer);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next * This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite. * generation being essentially a complete rewrite.
* *
* $Id: system.c,v 1.38 1995/05/26 21:00:43 jkh Exp $ * $Id: system.c,v 1.39 1995/05/28 09:36:06 jkh Exp $
* *
* Jordan Hubbard * Jordan Hubbard
* *
@ -105,9 +105,7 @@ systemShutdown(void)
int fd, on = 1; int fd, on = 1;
/* Put the console back */ /* Put the console back */
fd = open("/dev/ttyv0", O_RDONLY); ioctl(0, VT_RELDISP, 1);
if (fd != -1)
ioctl(fd, TIOCCONS, &on);
reboot(RB_HALT); reboot(RB_HALT);
} }
else else