chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sysctl: accept multiple passed configuration files
[elogind.git]
/
src
/
install.c
diff --git
a/src/install.c
b/src/install.c
index cfbd50ead954c93e518f19d05be6ef7f6402f5fe..174d79bab6bc3eb72de371fe968465fb5968927c 100644
(file)
--- a/
src/install.c
+++ b/
src/install.c
@@
-72,9
+72,8
@@
static int get_config_path(UnitFileScope scope, bool runtime, const char *root_d
case UNIT_FILE_SYSTEM:
if (root_dir && runtime)
case UNIT_FILE_SYSTEM:
if (root_dir && runtime)
- return -EINVAL;
-
- if (runtime)
+ asprintf(&p, "%s/run/systemd/system", root_dir);
+ else if (runtime)
p = strdup("/run/systemd/system");
else if (root_dir)
asprintf(&p, "%s/%s", root_dir, SYSTEM_CONFIG_UNIT_PATH);
p = strdup("/run/systemd/system");
else if (root_dir)
asprintf(&p, "%s/%s", root_dir, SYSTEM_CONFIG_UNIT_PATH);
@@
-1572,10
+1571,10
@@
UnitFileState unit_file_get_state(
}
if (lstat(path, &st) < 0) {
}
if (lstat(path, &st) < 0) {
+ r = -errno;
if (errno == ENOENT)
continue;
if (errno == ENOENT)
continue;
- r = -errno;
goto finish;
}
goto finish;
}