X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fpath-lookup.c;h=28336ebf150bda755e8f0344aae3429d3af10fd6;hb=5275d3c13d6321ffd749a976aaad69321313fac7;hp=7a5b9b813e0a02610421c22c8faa5a725700dc9c;hpb=10e87ee7f66b59a504c0ed2025463ba5faa69923;p=elogind.git diff --git a/src/path-lookup.c b/src/path-lookup.c index 7a5b9b813..28336ebf1 100644 --- a/src/path-lookup.c +++ b/src/path-lookup.c @@ -1,4 +1,4 @@ -/*-*- Mode: C; c-basic-offset: 8 -*-*/ +/*-*- Mode: C; c-basic-offset: 8; indent-tabs-mode: nil -*-*/ /*** This file is part of systemd. @@ -96,7 +96,7 @@ static char** session_dirs(void) { * one. */ mkdir_parents(data_home, 0777); - symlink("../../../.config/systemd/session", data_home); + (void) symlink("../../../.config/systemd/session", data_home); } if ((e = getenv("XDG_DATA_DIRS"))) @@ -181,13 +181,17 @@ int lookup_paths_init(LookupPaths *p, ManagerRunningAs running_as) { return -ENOMEM; } else if (!(p->unit_path = strv_new( - SYSTEM_CONFIG_UNIT_PATH, /* /etc/systemd/system/ */ - SYSTEM_DATA_UNIT_PATH, /* /lib/systemd/system/ */ + SYSTEM_CONFIG_UNIT_PATH, + "/etc/systemd/system", + "/usr/local/share/systemd/system", + "/usr/share/systemd/system", + "/lib/systemd/system", + SYSTEM_DATA_UNIT_PATH, NULL))) return -ENOMEM; } - if (running_as == MANAGER_INIT) { + if (running_as == MANAGER_SYSTEM) { /* /etc/init.d/ compatibility does not matter to users */ if ((e = getenv("SYSTEMD_SYSVINIT_PATH")))