summaryrefslogtreecommitdiffstats
path: root/release/sysinstall
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-12-26 03:32:50 +0000
committerjkh <jkh@FreeBSD.org>1996-12-26 03:32:50 +0000
commitd86faf3855bac2f4f7342cf3d3c297cdacac51f2 (patch)
tree7b1ad7796d8a0c13f9adaceca1217d6fbeba41bf /release/sysinstall
parentaba55faa0dec69b90ec409a34d443ae03aa37f58 (diff)
downloadFreeBSD-src-d86faf3855bac2f4f7342cf3d3c297cdacac51f2.zip
FreeBSD-src-d86faf3855bac2f4f7342cf3d3c297cdacac51f2.tar.gz
Fix fixit floppy.
Diffstat (limited to 'release/sysinstall')
-rw-r--r--release/sysinstall/install.c30
1 files changed, 21 insertions, 9 deletions
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 356567a..1d09670 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
- * $Id: install.c,v 1.144 1996/12/02 05:01:02 jkh Exp $
+ * $Id: install.c,v 1.145 1996/12/12 23:12:44 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -274,9 +274,7 @@ installFixitFloppy(dialogMenuItem *self)
if (msgYesNo("Unable to mount the fixit floppy - do you want to try again?") != 0)
return DITEM_FAILURE;
}
- dialog_clear();
- end_dialog();
- DialogActive = FALSE;
+
if (!directory_exists("/tmp"))
(void)symlink("/mnt2/tmp", "/tmp");
if (!directory_exists("/var/tmp/vi.recover")) {
@@ -299,7 +297,20 @@ installFixitFloppy(dialogMenuItem *self)
if (!file_readable(TERMCAP_FILE))
create_termcap();
if (!(child = fork())) {
+ int i, fd;
struct termios foo;
+ extern int login_tty(int);
+
+ ioctl(0, TIOCNOTTY, NULL);
+ for (i = getdtablesize(); i >= 0; --i)
+ close(i);
+ fd = open("/dev/ttyv3", O_RDWR);
+ ioctl(0, TIOCSCTTY, &fd);
+ dup2(0, 1);
+ dup2(0, 2);
+ DebugFD = 2;
+ if (login_tty(fd) == -1)
+ msgDebug("fixit: I can't set the controlling terminal.\n");
signal(SIGTTOU, SIG_IGN);
if (tcgetattr(0, &foo) != -1) {
@@ -317,13 +328,14 @@ installFixitFloppy(dialogMenuItem *self)
msgDebug("fixit shell: Failed to execute shell!\n");
return -1;
}
- else
+ else {
+ msgNotify("Waiting for fixit shell to exit. Go to VTY4 now by\n"
+ "typing ALT-F4. When you are done, type ``exit'' to exit\n"
+ "the fixit shell and be returned here.");
(void)waitpid(child, &waitstatus, 0);
-
- DialogActive = TRUE;
- clear();
- dialog_clear();
+ }
unmount("/mnt2", MNT_FORCE);
+ dialog_clear();
msgConfirm("Please remove the fixit floppy now.");
return DITEM_SUCCESS;
}
OpenPOWER on IntegriCloud