From 57a3ad3e15710ad5fd8dc5b1d86e298bd3e594f8 Mon Sep 17 00:00:00 2001 From: Poul-Henning Kamp Date: Fri, 21 Oct 1994 05:36:43 +0000 Subject: [PATCH] Now stage2 runs all the way.. --- sbin/sysinstall/exec.c | 13 +++++++++---- sbin/sysinstall/stage2.c | 5 +++-- sbin/sysinstall/sysinstall.h | 4 ++-- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/sbin/sysinstall/exec.c b/sbin/sysinstall/exec.c index 8f8889d42e2c..793ff303becb 100644 --- a/sbin/sysinstall/exec.c +++ b/sbin/sysinstall/exec.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: utils.c,v 1.4 1994/10/20 19:30:56 ache Exp $ + * $Id: exec.c,v 1.1 1994/10/21 02:14:49 phk Exp $ * */ @@ -33,7 +33,6 @@ exec(int magic, char *cmd, char *args, ...) int pid, w, status; char *argv[EXEC_MAXARG]; int arg = 0; - int no_args = 0; va_list ap; struct stat dummy; int i; @@ -53,13 +52,19 @@ exec(int magic, char *cmd, char *args, ...) if ((pid = fork()) == 0) { switch (magic) { + case 0: + close(0); open("/dev/null",O_RDONLY); + close(1); open("/dev/null",O_WRONLY); + close(2); open("/dev/null",O_WRONLY); + break; case 1: close(0); i = open("/file.list",O_RDONLY); if (i != 0) { - perror("/etc/file.list"); - exit(2); + perror("Couldn't open /etc/file.list"); } + close(1); open("/dev/null",O_WRONLY); + close(2); open("/dev/null",O_WRONLY); break; default: break; diff --git a/sbin/sysinstall/stage2.c b/sbin/sysinstall/stage2.c index bc6e6eec310c..f48b8e191419 100644 --- a/sbin/sysinstall/stage2.c +++ b/sbin/sysinstall/stage2.c @@ -6,7 +6,7 @@ * this stuff is worth it, you can buy me a beer in return. Poul-Henning Kamp * ---------------------------------------------------------------------------- * - * $Id: stage2.c,v 1.3 1994/10/20 19:30:53 ache Exp $ + * $Id: stage2.c,v 1.4 1994/10/21 02:14:51 phk Exp $ * */ @@ -44,7 +44,7 @@ stage2() strcat(pbuf, *p); i = exec(0, "/bin/newfs", "/bin/newfs", pbuf, 0); if (i) - Fatal("Exec(/bin/newfs) failed, code=%d.",i); + TellEm("Exec(/bin/newfs) failed, code=%d.",i); } for(q=mountpoint,p = devicename; *p; p++,q++) { @@ -100,4 +100,5 @@ stage2() if (unmount(dbuf, 0) == -1) Fatal("Error unmounting %s.",dbuf); } + dialog_msgbox(TITLE,"Remove the floppydisk from the drive, and hit return to reboot from the harddisk",6, 75, 1); } diff --git a/sbin/sysinstall/sysinstall.h b/sbin/sysinstall/sysinstall.h index 5872b7f61c6b..b92bffd1fa69 100644 --- a/sbin/sysinstall/sysinstall.h +++ b/sbin/sysinstall/sysinstall.h @@ -20,8 +20,8 @@ #define SCRATCHSIZE 1024 #define ERRMSGSIZE 256 #define DEFROOTSIZE 16 -#define DEFSWAPSIZE 32 -#define DEFUSRSIZE 120 +#define DEFSWAPSIZE 16 +#define DEFUSRSIZE 80 /* My disk is not that big Paul ! */ #define BOOT_MAGIC 0xAA55 #define ACTIVE 0x80