1
1
mirror of https://github.com/systemd/systemd-stable.git synced 2025-01-10 01:17:44 +03:00

install: search preset files in /run (#7715)

According to systemd.preset(5), presets files in /run should take
effect. However, before this patch, preset files in /run were
ignored.
This commit is contained in:
John Lin 2018-01-05 20:15:42 +08:00 committed by Zbigniew Jędrzejewski-Szmek
parent 5035800495
commit 7c59ab4ba1

View File

@ -2784,6 +2784,7 @@ static int read_presets(UnitFileScope scope, const char *root_dir, Presets *pres
if (scope == UNIT_FILE_SYSTEM)
r = conf_files_list(&files, ".preset", root_dir, 0,
"/etc/systemd/system-preset",
"/run/systemd/system-preset",
"/usr/local/lib/systemd/system-preset",
"/usr/lib/systemd/system-preset",
#if HAVE_SPLIT_USR
@ -2793,6 +2794,7 @@ static int read_presets(UnitFileScope scope, const char *root_dir, Presets *pres
else if (scope == UNIT_FILE_GLOBAL)
r = conf_files_list(&files, ".preset", root_dir, 0,
"/etc/systemd/user-preset",
"/run/systemd/user-preset",
"/usr/local/lib/systemd/user-preset",
"/usr/lib/systemd/user-preset",
NULL);