summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-11-16 12:30:33 +0100
committerLennart Poettering <lennart@poettering.net>2017-11-17 11:28:17 +0100
commit264212289821f357cc3a1df32c5bf0fbb8fcc277 (patch)
tree0ae2a76fe808aadea30499bb6d725154acec3995 /src
parentmain: uid_to_name() might theoretically fail, handle that (diff)
downloadsystemd-264212289821f357cc3a1df32c5bf0fbb8fcc277.tar.xz
systemd-264212289821f357cc3a1df32c5bf0fbb8fcc277.zip
install: when we encounter a transient/generated unit while presetting all, skip over it silently
Fixes: #7100
Diffstat (limited to 'src')
-rw-r--r--src/shared/install.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/shared/install.c b/src/shared/install.c
index 5516799e6b..99761f99da 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -3121,6 +3121,8 @@ int unit_file_preset_all(
else if (r == -ENOLINK)
r = unit_file_changes_add(changes, n_changes,
UNIT_FILE_IS_DANGLING, de->d_name, NULL);
+ else if (r == -EADDRNOTAVAIL) /* Ignore generated/transient units when applying preset */
+ continue;
if (r < 0)
return r;
}