diff --git a/data/system/boot/SetupEnvironment b/data/system/boot/SetupEnvironment index 0572b19e7a..25558c5ef4 100644 --- a/data/system/boot/SetupEnvironment +++ b/data/system/boot/SetupEnvironment @@ -42,13 +42,13 @@ export BE_LINKER=ld export BE_DEFAULT_C_FLAGS="" export BE_DEFAULT_CPLUS_FLAGS="" -export PATH=.:$HOME/config/bin:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:$BETOOLS - if [ "$SAFEMODE" != "yes" ] then + export PATH=.:$HOME/config/bin:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:$BETOOLS export LIBRARY_PATH="%A/lib:$HOME/config/lib:/boot/beos/system/lib" export ADDON_PATH="%A/add-ons:$HOME/config/add-ons:/boot/beos/system/add-ons" else + export PATH=.:/bin:/boot/apps:/boot/preferences:/boot/beos/apps:/boot/beos/preferences:$BETOOLS export LIBRARY_PATH="%A/lib:/boot/beos/system/lib" export ADDON_PATH="%A/add-ons:/boot/beos/system/add-ons" fi diff --git a/src/system/runtime_loader/runtime_loader.c b/src/system/runtime_loader/runtime_loader.c index 7b7302db88..358c985d74 100644 --- a/src/system/runtime_loader/runtime_loader.c +++ b/src/system/runtime_loader/runtime_loader.c @@ -49,14 +49,17 @@ search_path_for_type(image_type type) return NULL; } - // ToDo: for now, if the variable was not set, return default paths if (path != NULL) return path; + // The environment variables may not have been set yet - in that case, + // we're returning some useful defaults. + // Since the kernel does not set any variables, this is also needed + // to start the root shell. + switch (type) { case B_APP_IMAGE: - return "/boot/home/config/bin:" - "/bin:" + return "/bin:" "/boot/apps:" "/boot/preferences:" "/boot/beos/apps:" @@ -64,11 +67,10 @@ search_path_for_type(image_type type) "/boot/develop/tools/gnupro/bin"; case B_LIBRARY_IMAGE: - return "%A/lib:/boot/home/config/lib:/boot/beos/system/lib"; + return "%A/lib:/boot/beos/system/lib"; case B_ADD_ON_IMAGE: return "%A/add-ons" - ":/boot/home/config/add-ons" ":/boot/beos/system/add-ons"; default: