X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fshared%2Finstall.c;h=13ae9a976f4d03643b5be00cafa59ca5f4709a2e;hb=ac7019f33f1618f5b69ed44a8623e2596f1e3856;hp=d6644e580fbf16cc904bfe92ec4837a7a347d389;hpb=78d54bd42b87818f5d0ef862d247f9db4844fadd;p=elogind.git diff --git a/src/shared/install.c b/src/shared/install.c index d6644e580..13ae9a976 100644 --- a/src/shared/install.c +++ b/src/shared/install.c @@ -60,7 +60,8 @@ static int lookup_paths_init_from_scope(LookupPaths *paths, UnitFileScope scope) return lookup_paths_init(paths, scope == UNIT_FILE_SYSTEM ? MANAGER_SYSTEM : MANAGER_USER, - scope == UNIT_FILE_USER); + scope == UNIT_FILE_USER, + NULL, NULL, NULL); } static int get_config_path(UnitFileScope scope, bool runtime, const char *root_dir, char **ret) { @@ -1150,7 +1151,7 @@ static int create_symlink( assert(old_path); assert(new_path); - mkdir_parents(new_path, 0755); + mkdir_parents_label(new_path, 0755); if (symlink(old_path, new_path) >= 0) { add_file_change(changes, n_changes, UNIT_FILE_SYMLINK, new_path, old_path); @@ -1682,16 +1683,18 @@ int unit_file_query_preset(UnitFileScope scope, const char *name) { if (scope == UNIT_FILE_SYSTEM) r = conf_files_list(&files, ".preset", - "/etc/systemd/system.preset", - "/usr/local/lib/systemd/system.preset", - "/usr/lib/systemd/system.preset", - "/lib/systemd/system.preset", + "/etc/systemd/system-preset", + "/usr/local/lib/systemd/system-preset", + "/usr/lib/systemd/system-preset", +#ifdef HAVE_SPLIT_USR + "/lib/systemd/system-preset", +#endif NULL); else if (scope == UNIT_FILE_GLOBAL) r = conf_files_list(&files, ".preset", - "/etc/systemd/user.preset", - "/usr/local/lib/systemd/user.preset", - "/usr/lib/systemd/user.preset", + "/etc/systemd/user-preset", + "/usr/local/lib/systemd/user-preset", + "/usr/lib/systemd/user-preset", NULL); else return 1;