So there. Now we live on the hard-disk!

This commit is contained in:
Poul-Henning Kamp 1994-10-26 05:41:02 +00:00
parent 076bf3789e
commit 281d3e3bd9
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=3883
5 changed files with 19 additions and 5 deletions

View File

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

View File

@ -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");

View File

@ -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"))

View File

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

View File

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