summaryrefslogtreecommitdiffstats
path: root/mdk-stage1
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-04 17:53:11 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-04 17:53:11 +0000
commit53b29b4e08fb1f5c5e55f24aa8bd0030f0a7399c (patch)
tree987b42a82226850d1bcb055d6e8dac7c5b7f2a2b /mdk-stage1
parent86c0067f5ed07aa478eadc94d7336d30a846a87f (diff)
downloaddrakx-53b29b4e08fb1f5c5e55f24aa8bd0030f0a7399c.tar
drakx-53b29b4e08fb1f5c5e55f24aa8bd0030f0a7399c.tar.gz
drakx-53b29b4e08fb1f5c5e55f24aa8bd0030f0a7399c.tar.bz2
drakx-53b29b4e08fb1f5c5e55f24aa8bd0030f0a7399c.tar.xz
drakx-53b29b4e08fb1f5c5e55f24aa8bd0030f0a7399c.zip
need to handle totem clp at stage1 because it needs to provide /usr directory
Diffstat (limited to 'mdk-stage1')
-rw-r--r--mdk-stage1/config-stage1.h1
-rw-r--r--mdk-stage1/stage1.c17
2 files changed, 18 insertions, 0 deletions
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;