summaryrefslogtreecommitdiff
path: root/src/core/load-fragment.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2015-08-28 16:05:32 +0200
committerLennart Poettering <lennart@poettering.net>2015-08-31 13:20:43 +0200
commit3f5e811594bcdb25d3aa859cb0be06f6df3a03b9 (patch)
treeafa849b78dd017f164fb5d539d9557bf63154f29 /src/core/load-fragment.c
parent3850d0505fb4350dccdd63cf6129db40fe9b5bd0 (diff)
core: don't generate stub unit file for transient units
We store the properties for transient units in drop-ins anyway, and units don't have to have fragment files, hence don't bother with them, and don't create them.
Diffstat (limited to 'src/core/load-fragment.c')
-rw-r--r--src/core/load-fragment.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/load-fragment.c b/src/core/load-fragment.c
index b3bf8bdb40..721da3470e 100644
--- a/src/core/load-fragment.c
+++ b/src/core/load-fragment.c
@@ -3603,6 +3603,11 @@ int unit_load_fragment(Unit *u) {
assert(u->load_state == UNIT_STUB);
assert(u->id);
+ if (u->transient) {
+ u->load_state = UNIT_LOADED;
+ return 0;
+ }
+
/* First, try to find the unit under its id. We always look
* for unit files in the default directories, to make it easy
* to override things by placing things in /etc/systemd/system */