wait for tty[23], seems also fix hard drives presense on el-smp
This commit is contained in:
parent
eb77419a50
commit
fccb211884
8
log.c
8
log.c
@ -67,8 +67,14 @@ void log_perror(char *msg)
|
||||
|
||||
void open_log(void)
|
||||
{
|
||||
int i;
|
||||
int timeout = 60;
|
||||
if (!IS_TESTING) {
|
||||
logfile = fopen("/dev/tty3", "w");
|
||||
for(i=0; i < timeout; i++ ) {
|
||||
logfile = fopen("/dev/tty3", "w");
|
||||
if(logfile > -1) break;
|
||||
sleep(1);
|
||||
}
|
||||
if (!logfile)
|
||||
logfile = fopen("/tmp/install.log", "a");
|
||||
}
|
||||
|
8
stage1.c
8
stage1.c
@ -110,12 +110,18 @@ static void spawn_shell(void)
|
||||
{
|
||||
#ifdef SPAWN_SHELL
|
||||
int fd;
|
||||
int i;
|
||||
int timeout=60;
|
||||
char * shell_name[] = { "/bin/sh", NULL };
|
||||
|
||||
log_message("spawning a shell");
|
||||
|
||||
if (!IS_TESTING) {
|
||||
fd = open("/dev/tty2", O_RDWR);
|
||||
for(i=0; i < timeout; i++ ) {
|
||||
fd = open("/dev/tty2", O_RDWR);
|
||||
if(fd > -1) break;
|
||||
sleep(1);
|
||||
}
|
||||
if (fd == -1) {
|
||||
log_message("cannot open /dev/tty2 -- no shell will be provided");
|
||||
return;
|
||||
|
Loading…
x
Reference in New Issue
Block a user