launch_daemon: Added /system/data/user_launch directory.
* This directory is for services that are launched per user (in a user context), but installed globally. * This is now used for the default "user" configuration; before this was put into ~/config/non-packaged/data/launch, which didn't really fit, and has the huge disadvantage that it cannot be updated. * Fixes part of #12227.
This commit is contained in:
parent
4a99aae9e4
commit
5e541a6042
@ -277,10 +277,6 @@ SEARCH on $(networkSettingsFiles)
|
||||
= [ FDirName $(HAIKU_TOP) data settings network ] ;
|
||||
AddFilesToHaikuImage system settings network : $(networkSettingsFiles) ;
|
||||
|
||||
local userLaunchScripts = <data!launch>user ;
|
||||
SEARCH on $(userLaunchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
|
||||
AddFilesToHaikuImage home config non-packaged data launch : $(userLaunchScripts) ;
|
||||
|
||||
# fresh install indicator file for the post install scripts
|
||||
SEARCH on <post-install>fresh_install
|
||||
= [ FDirName $(HAIKU_TOP) data system settings ] ;
|
||||
|
@ -132,6 +132,10 @@ local launchScripts = <data!launch>system ;
|
||||
SEARCH on $(launchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
|
||||
AddFilesToPackage data launch : $(launchScripts) ;
|
||||
|
||||
local userLaunchScripts = <data!launch>user ;
|
||||
SEARCH on $(userLaunchScripts) = [ FDirName $(HAIKU_TOP) data launch ] ;
|
||||
AddFilesToPackage data user_launch : $(userLaunchScripts) ;
|
||||
|
||||
# post install scripts
|
||||
local postInstallFiles = add_catalog_entry_attributes.sh
|
||||
default_deskbar_items.sh ;
|
||||
|
@ -50,6 +50,7 @@ using BSupportKit::BPrivate::JobQueue;
|
||||
|
||||
|
||||
static const char* kLaunchDirectory = "launch";
|
||||
static const char* kUserLaunchDirectory = "user_launch";
|
||||
|
||||
|
||||
class Session {
|
||||
@ -353,10 +354,23 @@ LaunchDaemon::ReadyToRun()
|
||||
_InitSystem();
|
||||
|
||||
BStringList paths;
|
||||
if (fUserMode) {
|
||||
// System-wide user specific jobs
|
||||
BPathFinder::FindPaths(B_FIND_PATH_DATA_DIRECTORY, kUserLaunchDirectory,
|
||||
B_FIND_PATHS_SYSTEM_ONLY, paths);
|
||||
_ReadPaths(paths);
|
||||
}
|
||||
|
||||
BPathFinder::FindPaths(B_FIND_PATH_DATA_DIRECTORY, kLaunchDirectory,
|
||||
fUserMode ? B_FIND_PATHS_USER_ONLY : B_FIND_PATHS_SYSTEM_ONLY, paths);
|
||||
_ReadPaths(paths);
|
||||
|
||||
if (fUserMode) {
|
||||
BPathFinder::FindPaths(B_FIND_PATH_SETTINGS_DIRECTORY,
|
||||
kUserLaunchDirectory, B_FIND_PATHS_SYSTEM_ONLY, paths);
|
||||
_ReadPaths(paths);
|
||||
}
|
||||
|
||||
BPathFinder::FindPaths(B_FIND_PATH_SETTINGS_DIRECTORY, kLaunchDirectory,
|
||||
fUserMode ? B_FIND_PATHS_USER_ONLY : B_FIND_PATHS_SYSTEM_ONLY, paths);
|
||||
_ReadPaths(paths);
|
||||
|
Loading…
Reference in New Issue
Block a user