From cbf92a3a8e9f1f31381dacba94521fbd9d840971 Mon Sep 17 00:00:00 2001 From: Guillaume Cottenceau Date: Tue, 4 Nov 2003 18:33:06 +0000 Subject: allow to still be able to work when running in -u mode --- mdk-stage1/stage1.c | 9 +++++++-- 1 file 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 -- cgit v1.2.1