From 60164fa078d98de65eb9dff39c218b3d6653e818 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Thu, 9 Oct 2003 16:21:09 +0000 Subject: boot live_tree! :) --- mdk-stage1/cdrom.c | 4 ++++ mdk-stage1/config-stage1.h | 2 +- mdk-stage1/network.c | 4 ++++ mdk-stage1/stage1.c | 4 ++-- 4 files changed, 11 insertions(+), 3 deletions(-) (limited to 'mdk-stage1') diff --git a/mdk-stage1/cdrom.c b/mdk-stage1/cdrom.c index 6004ddf98..8fc4868d4 100644 --- a/mdk-stage1/cdrom.c +++ b/mdk-stage1/cdrom.c @@ -47,7 +47,11 @@ static int mount_that_cd_device(char * dev_name) static int test_that_cd() { +#ifdef MANDRAKE_MOVE + return access(IMAGE_LOCATION "/usr/bin/runstage2", R_OK); +#else return access(IMAGE_LOCATION LIVE_LOCATION, R_OK); +#endif } diff --git a/mdk-stage1/config-stage1.h b/mdk-stage1/config-stage1.h index 75dfb838d..384af7f68 100644 --- a/mdk-stage1/config-stage1.h +++ b/mdk-stage1/config-stage1.h @@ -35,7 +35,7 @@ #ifdef MANDRAKE_MOVE #define IMAGE_LOCATION "/sysroot/image" #define SLASH_LOCATION "/sysroot" -#define LIVE_LOCATION_REL "/image/Mandrake/mdkinst" +#define LIVE_LOCATION_REL "/image" #else #define IMAGE_LOCATION "/tmp/image" #endif diff --git a/mdk-stage1/network.c b/mdk-stage1/network.c index 6e3449f76..84baba81e 100644 --- a/mdk-stage1/network.c +++ b/mdk-stage1/network.c @@ -660,7 +660,11 @@ enum return_type nfs_prepare(void) continue; } +#ifdef MANDRAKE_MOVE + if (access(IMAGE_LOCATION "/usr/bin/runstage2", R_OK)) { +#else if (access(IMAGE_LOCATION LIVE_LOCATION, R_OK)) { +#endif stg1_error_message("That NFS volume does not seem to contain the " DISTRIB_NAME " Distribution."); umount(IMAGE_LOCATION); results = RETURN_BACK; diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index b7055ac79..f97aa472d 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -394,7 +394,7 @@ int mandrake_move_post(void) int fd; char rootdev[] = "0x0100"; - if (scall(!(f = fopen(IMAGE_LOCATION LIVE_LOCATION "symlinks", "rb")), "fopen")) + if (scall(!(f = fopen(IMAGE_LOCATION "/move/symlinks", "rb")), "fopen")) return RETURN_ERROR; while (fgets(buf, sizeof(buf), f)) { char oldpath[500], newpath[500]; @@ -411,7 +411,7 @@ int mandrake_move_post(void) // we need only the ones before mounting /dev as devfs if (scall(mkdir(SLASH_LOCATION "/dev", 0755), "mkdir")) return RETURN_ERROR; - if (scall(!(f = fopen(IMAGE_LOCATION LIVE_LOCATION "devices", "rb")), "fopen")) + if (scall(!(f = fopen(IMAGE_LOCATION "/move/devices", "rb")), "fopen")) return RETURN_ERROR; while (fgets(buf, sizeof(buf), f)) { char name[500], path[500], type; -- cgit v1.2.1