if ((e = getenv("XDG_DATA_DIRS")))
data_dirs = strv_split(e, ":");
else
- data_dirs = strv_new("/usr/local/share", "/usr/share", NULL);
+ data_dirs = strv_new("/usr/local/share",
+ "/usr/local/lib",
+ "/usr/share",
+ "/usr/lib",
+ NULL);
if (!data_dirs)
goto fail;
"/run/systemd/system",
SYSTEM_CONFIG_UNIT_PATH,
"/etc/systemd/system",
- "/usr/local/share/systemd/system",
- "/usr/share/systemd/system",
+ "/usr/local/lib/systemd/system",
+ "/usr/lib/systemd/system",
"/lib/systemd/system",
SYSTEM_DATA_UNIT_PATH,
NULL)))
return -ENOMEM;
strv_uniq(p->unit_path);
+ strv_path_remove_empty(p->unit_path);
if (!strv_isempty(p->unit_path)) {
strv_uniq(p->sysvinit_path);
strv_uniq(p->sysvrcnd_path);
+ strv_path_remove_empty(p->sysvinit_path);
+ strv_path_remove_empty(p->sysvrcnd_path);
+
if (!strv_isempty(p->sysvinit_path)) {
if (!(t = strv_join(p->sysvinit_path, "\n\t")))