* Removed all user paths from the default runtime_loader paths.
* $PATH is now set differently when booted in safe mode (just like LIBRARY_PATH, and ADDON_PATH already were). * This closes ticket #1103. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@21406 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -42,13 +42,13 @@ export BE_LINKER=ld
|
|||||||
export BE_DEFAULT_C_FLAGS=""
|
export BE_DEFAULT_C_FLAGS=""
|
||||||
export BE_DEFAULT_CPLUS_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" ]
|
if [ "$SAFEMODE" != "yes" ]
|
||||||
then
|
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 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"
|
export ADDON_PATH="%A/add-ons:$HOME/config/add-ons:/boot/beos/system/add-ons"
|
||||||
else
|
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 LIBRARY_PATH="%A/lib:/boot/beos/system/lib"
|
||||||
export ADDON_PATH="%A/add-ons:/boot/beos/system/add-ons"
|
export ADDON_PATH="%A/add-ons:/boot/beos/system/add-ons"
|
||||||
fi
|
fi
|
||||||
|
|||||||
@@ -49,14 +49,17 @@ search_path_for_type(image_type type)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ToDo: for now, if the variable was not set, return default paths
|
|
||||||
if (path != NULL)
|
if (path != NULL)
|
||||||
return path;
|
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) {
|
switch (type) {
|
||||||
case B_APP_IMAGE:
|
case B_APP_IMAGE:
|
||||||
return "/boot/home/config/bin:"
|
return "/bin:"
|
||||||
"/bin:"
|
|
||||||
"/boot/apps:"
|
"/boot/apps:"
|
||||||
"/boot/preferences:"
|
"/boot/preferences:"
|
||||||
"/boot/beos/apps:"
|
"/boot/beos/apps:"
|
||||||
@@ -64,11 +67,10 @@ search_path_for_type(image_type type)
|
|||||||
"/boot/develop/tools/gnupro/bin";
|
"/boot/develop/tools/gnupro/bin";
|
||||||
|
|
||||||
case B_LIBRARY_IMAGE:
|
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:
|
case B_ADD_ON_IMAGE:
|
||||||
return "%A/add-ons"
|
return "%A/add-ons"
|
||||||
":/boot/home/config/add-ons"
|
|
||||||
":/boot/beos/system/add-ons";
|
":/boot/beos/system/add-ons";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
|||||||
Reference in New Issue
Block a user