* 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:
parent
4963ddd8fa
commit
93c2088983
@ -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
|
||||
|
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user