X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Finstall.c;fp=src%2Finstall.c;h=1fb1f9d5800e7fc3ccad1b6c222be0058bfdbd18;hb=d380a3bcd14376ed72286e78dbcc871b7d6d2151;hp=cfbd50ead954c93e518f19d05be6ef7f6402f5fe;hpb=2096e009a790073a934f5cd07d17024d3b199d0b;p=elogind.git diff --git a/src/install.c b/src/install.c index cfbd50ead..1fb1f9d58 100644 --- 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) - 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);