summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-05-22 23:08:24 +0200
committerLennart Poettering <lennart@poettering.net>2012-05-22 23:08:24 +0200
commit1b64d026af01277e332d10d9e67e2eed5a4ded28 (patch)
treeaf94d466a69a851a4a3ca9f169d6aacee5531669 /src/core/load-fragment.c
parenta6903061530cac5fbaa99a080a93221c02c349f9 (diff)
units: remove service sysv_path variable and replace it by generic unit_path
UnitPath= is also writable via native units and may be used by generators to clarify from which file a unit is generated. This patch also hooks up the cryptsetup and fstab generators to set UnitPath= accordingly.
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index 3bc053341c..d2267722dd 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -2320,6 +2320,13 @@ static int load_from_path(Unit *u, const char *path) {
u->fragment_mtime = timespec_load(&st.st_mtim);
+ if (u->source_path) {
+ if (stat(u->source_path, &st) >= 0)
+ u->source_mtime = timespec_load(&st.st_mtim);
+ else
+ u->source_mtime = 0;
+ }
+
r = 0;
finish: