From 53b29b4e08fb1f5c5e55f24aa8bd0030f0a7399c Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 4 Nov 2003 17:53:11 +0000 Subject: need to handle totem clp at stage1 because it needs to provide /usr directory --- mdk-stage1/config-stage1.h | 1 + mdk-stage1/stage1.c | 17 +++++++++++++++++ 2 files changed, 18 insertions(+) (limited to 'mdk-stage1') diff --git a/mdk-stage1/config-stage1.h b/mdk-stage1/config-stage1.h index 0a4ce0f7a..fea665858 100644 --- a/mdk-stage1/config-stage1.h +++ b/mdk-stage1/config-stage1.h @@ -40,6 +40,7 @@ #define LIVE_LOCATION_REL "/image" #define BOOT_LOCATION "/sysroot/image_boot" #define ALWAYS_LOCATION "/sysroot/image_always" +#define TOTEM_LOCATION "/sysroot/image_totem" #else #define DISTRIB_NAME "Mandrake Linux" #define IMAGE_LOCATION "/tmp/image" diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c index 4fad12748..618f393c7 100644 --- a/mdk-stage1/stage1.c +++ b/mdk-stage1/stage1.c @@ -430,6 +430,7 @@ int mandrake_move_post(void) char rootdev[] = "0x0100"; int boot__real_is_symlink_to_raw = 0; int always__real_is_symlink_to_raw = 0; + int totem__real_is_symlink_to_raw = 0; int main__real_is_symlink_to_raw = 0; if (handle_clp(IMAGE_LOCATION "/live_tree_boot.clp", IMAGE_LOCATION "/live_tree_boot/usr/bin/runstage2.pl", @@ -442,6 +443,11 @@ int mandrake_move_post(void) &always__real_is_symlink_to_raw, SLASH_LOCATION "/live_tree_always.clp") != RETURN_OK) return RETURN_ERROR; + if (handle_clp(IMAGE_LOCATION "/live_tree_totem.clp", IMAGE_LOCATION "/live_tree_totem/usr/bin/totem", + IMAGE_LOCATION "/live_tree_totem", TOTEM_LOCATION, + &totem__real_is_symlink_to_raw, SLASH_LOCATION "/live_tree_totem.clp") != RETURN_OK) + return RETURN_ERROR; + if (handle_clp(IMAGE_LOCATION "/live_tree.clp", IMAGE_LOCATION "/live_tree/etc/fstab", IMAGE_LOCATION "/live_tree", IMAGE_LOCATION_REAL, &main__real_is_symlink_to_raw, NULL) != RETURN_OK) @@ -459,6 +465,10 @@ int mandrake_move_post(void) return RETURN_ERROR; } fclose(f); + + // hardcoded :( + if (scall(symlink("/image_totem/usr", SLASH_LOCATION "/usr"), "symlink")) + return RETURN_ERROR; // need to create the few devices needed to start up stage2 in a decent manner, we can't symlink or they will keep CD busy // we need only the ones before mounting /dev as devfs @@ -491,6 +501,13 @@ int mandrake_move_post(void) return RETURN_ERROR; } + if (totem__real_is_symlink_to_raw) { + if (scall(unlink(TOTEM_LOCATION), "unlink")) + return RETURN_ERROR; + if (scall(symlink(RAW_LOCATION_REL "/live_tree_totem", TOTEM_LOCATION), "symlink")) + return RETURN_ERROR; + } + if (main__real_is_symlink_to_raw) { if (scall(unlink(IMAGE_LOCATION_REAL), "unlink")) return RETURN_ERROR; -- cgit v1.2.1