summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Cottenceau <gc@mandriva.com>2003-11-04 18:33:06 +0000
committerGuillaume Cottenceau <gc@mandriva.com>2003-11-04 18:33:06 +0000
commitcbf92a3a8e9f1f31381dacba94521fbd9d840971 (patch)
tree2995e89262627e4ab08200e85c3c96d79189cf89
parent7e51f93bebf1015500cb0786254963aa2a3d21ce (diff)
downloaddrakx-cbf92a3a8e9f1f31381dacba94521fbd9d840971.tar
drakx-cbf92a3a8e9f1f31381dacba94521fbd9d840971.tar.gz
drakx-cbf92a3a8e9f1f31381dacba94521fbd9d840971.tar.bz2
drakx-cbf92a3a8e9f1f31381dacba94521fbd9d840971.tar.xz
drakx-cbf92a3a8e9f1f31381dacba94521fbd9d840971.zip
allow to still be able to work when running in -u mode
-rw-r--r--mdk-stage1/stage1.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/mdk-stage1/stage1.c b/mdk-stage1/stage1.c
index 8f92e7f98..ae92d162f 100644
--- a/mdk-stage1/stage1.c
+++ b/mdk-stage1/stage1.c
@@ -467,8 +467,13 @@ int mandrake_move_post(void)
fclose(f);
// hardcoded :(
- if (scall(symlink("/image_totem/usr", SLASH_LOCATION "/usr"), "symlink"))
- return RETURN_ERROR;
+ if (!access(TOTEM_LOCATION, R_OK)) {
+ if (scall(symlink("/image_totem/usr", SLASH_LOCATION "/usr"), "symlink"))
+ return RETURN_ERROR;
+ } else
+ // need a fallback in case we don't use image_totem.clp nor live_tree_totem, but we're in -u mode
+ if (scall(symlink(LIVE_LOCATION_REL "/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