Fix fixit floppy.

This commit is contained in:
Jordan K. Hubbard 1996-12-26 03:32:50 +00:00
parent c69a537c8f
commit 0495d47f7e
3 changed files with 63 additions and 27 deletions

View File

@ -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;
}

View File

@ -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;
}

View File

@ -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;
}