From 281d3e3bd9232972fd02edb28edd8fb72f157c9f Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Wed, 26 Oct 1994 05:41:02 +0000 Subject: [PATCH] So there. Now we live on the hard-disk! --- sbin/sysinstall/exec.c | 3 ++- sbin/sysinstall/stage2.c | 3 +++ sbin/sysinstall/stage3.c | 9 ++++++++- sbin/sysinstall/stage4.c | 5 +++-- sbin/sysinstall/stage5.c | 4 +++- 5 files changed, 19 insertions(+), 5 deletions(-) diff --git a/sbin/sysinstall/exec.c b/sbin/sysinstall/exec.c index b4d678005e57..cbe9b744af31 100644 --- a/sbin/sysinstall/exec.c +++ b/sbin/sysinstall/exec.c @@ -57,8 +57,9 @@ exec(int magic, char *cmd, char *args, ...) close(2); open("/dev/null",O_WRONLY); break; case 1: - break; close(2); open("/dev/null",O_WRONLY); + break; + case 2: default: break; } diff --git a/sbin/sysinstall/stage2.c b/sbin/sysinstall/stage2.c index 5624632bfbf6..cc03c6c33737 100644 --- a/sbin/sysinstall/stage2.c +++ b/sbin/sysinstall/stage2.c @@ -64,8 +64,11 @@ stage2() CopyFile("/stand/sysinstall","/mnt/stand/sysinstall"); link("/mnt/stand/sysinstall","/mnt/stand/cpio"); link("/mnt/stand/sysinstall","/mnt/stand/gunzip"); + link("/mnt/stand/sysinstall","/mnt/stand/gzip"); + link("/mnt/stand/sysinstall","/mnt/stand/zcat"); link("/mnt/stand/sysinstall","/mnt/stand/newfs"); link("/mnt/stand/sysinstall","/mnt/stand/fsck"); + link("/mnt/stand/sysinstall","/mnt/stand/dialog"); CopyFile("/kernel","/mnt/kernel"); TellEm("make /dev entries"); chdir("/mnt/dev"); diff --git a/sbin/sysinstall/stage3.c b/sbin/sysinstall/stage3.c index 5cb46e92b3b7..d559e70a8396 100644 --- a/sbin/sysinstall/stage3.c +++ b/sbin/sysinstall/stage3.c @@ -38,13 +38,20 @@ stage3() mountflags = MNT_UPDATE; while((fs = getfsent()) != NULL) { - if (strcmp(fs->fs_vfstype,"ufs")) continue; p = fs->fs_spec; if (*p++ != '/') continue; if (*p++ != 'd') continue; if (*p++ != 'e') continue; if (*p++ != 'v') continue; if (*p++ != '/') continue; + + if (!strcmp(fs->fs_type,"sw")) { + swapon(fs->fs_file); + continue; + } + + if (strcmp(fs->fs_vfstype,"ufs")) continue; + if (!strcmp(fs->fs_type,"ro")) mountflags |= MNT_RDONLY; else if (!strcmp(fs->fs_type,"rw")) diff --git a/sbin/sysinstall/stage4.c b/sbin/sysinstall/stage4.c index b3af1678f550..1e962438c674 100644 --- a/sbin/sysinstall/stage4.c +++ b/sbin/sysinstall/stage4.c @@ -43,7 +43,7 @@ stage4() if(ffd > 0) break; } - TellEm("cd /stand ; gunzip < /dev/fd0 | cpio -icdum"); + TellEm("cd /stand ; gunzip < /dev/fd0 | cpio -idum"); pipe(pfd); zpid = fork(); if(!zpid) { @@ -60,7 +60,7 @@ stage4() close(pfd[1]); close(1); open("/dev/null",O_WRONLY); chdir("/stand"); - i = exec (1,"/stand/cpio","/stand/cpio","-icdum", 0); + i = exec (1,"/stand/cpio","/stand/cpio","-idum", 0); exit(i); } close(pfd[0]); @@ -75,5 +75,6 @@ stage4() Fatal("Pid %d, status %d, cpio=%d, gunzip=%d.\nerror:%s", i,j,cpid,zpid,strerror(errno)); + TellEm("unlink /stand/need_cpio_floppy"); unlink("/stand/need_cpio_floppy"); } diff --git a/sbin/sysinstall/stage5.c b/sbin/sysinstall/stage5.c index d6f9c3f15feb..cc4e971d30e6 100644 --- a/sbin/sysinstall/stage5.c +++ b/sbin/sysinstall/stage5.c @@ -27,6 +27,8 @@ void stage5() { + end_dialog(); + dialog_active=0; for(;;) - exec (1,"/stand/sh","/stand/-sh", 0); + exec (2,"/stand/sh","/stand/-sh", 0); }