From 66cdc556a27aeeb6dd50d099e7df09cec3562160 Mon Sep 17 00:00:00 2001 From: Antoine Ginies Date: Tue, 28 Feb 2006 14:10:53 +0000 Subject: fix path to ka-d-client and typo in tar parameter --- mdk-stage1/ka.c | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mdk-stage1/ka.c b/mdk-stage1/ka.c index d3c98e2fc..62c7a9c82 100644 --- a/mdk-stage1/ka.c +++ b/mdk-stage1/ka.c @@ -43,15 +43,15 @@ static void my_pause(void) { static enum return_type ka_wait_for_stage2(void) { char * ramdisk = "/dev/ram3"; /* warning, verify that this file exists in the initrd*/ - char * ka_launch[] = { "/ka/ka-d-client", "-w","-s","getstage2","-e","(cd /tmp/stage2; tar --extract --read-full-records --same-permissions --numeric-o wner --sparse --file - )", NULL }; /* The command line for ka_launch */ + char * ka_launch[] = { "/ka/ka-d-client", "-w","-s","getstage2","-e","(cd /sysroot/tmp/stage2; tar --extract --read-full-records --same-permissions --numeric-owner --sparse --file - )", NULL }; /* The command line for ka_launch */ char * mkfs_launch[] = { "/sbin/mke2fs", ramdisk, NULL}; /* The mkfs command for formating the ramdisk */ log_message("KA: Preparing to receive stage 2...."); int pida, wait_status; if (!(pida = fork())) { /* Forking current process for running mkfs */ - // close(1); - // close(2); + close(1); + close(2); execv(mkfs_launch[0], mkfs_launch); /* Formating the ramdisk */ printf("KA: Can't execute %s\n\n", mkfs_launch[0]); my_pause(); @@ -73,9 +73,6 @@ static enum return_type ka_wait_for_stage2(void) if ( pid == -1 ) { fprintf(stderr, "%s: Failed to fork()\n", strerror(errno)); exit(13); - } else if ( pid == 0 ) { - fprintf(stderr, "%s: Failed to fork()\n", strerror(errno)); - exit(13); } else if ( pid == 0 ) { execv(ka_launch[0], ka_launch); } else { -- cgit v1.2.1