summaryrefslogtreecommitdiff
path: root/src/sysv-generator
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2016-04-12 16:13:28 +0200
committerLennart Poettering <lennart@poettering.net>2016-04-12 16:19:57 +0200
commit3c6d8e57e870ed56dbb53ce62f0a3d32de101cd8 (patch)
tree86c8f475ec89015bb4ace239cfaa9db3c24af769 /src/sysv-generator
parent0bed31c1038c439cc5956fb44017ba28e503095b (diff)
systemctl: when we want to know whether there's a native unit file, don't choke on ELOOP
ELOOP indicates that there's a symlink in /etc for a native unit file, and that's completely OK.
Diffstat (limited to 'src/sysv-generator')
-rw-r--r--src/sysv-generator/sysv-generator.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/sysv-generator/sysv-generator.c b/src/sysv-generator/sysv-generator.c
index cae920eb3b..9392a3d2b5 100644
--- a/src/sysv-generator/sysv-generator.c
+++ b/src/sysv-generator/sysv-generator.c
@@ -807,10 +807,10 @@ static int enumerate_sysv(const LookupPaths *lp, Hashmap *all_services) {
continue;
r = unit_file_exists(UNIT_FILE_SYSTEM, lp, name);
- if (r < 0) {
+ if (r < 0 && !IN_SET(r, -ELOOP, -ESHUTDOWN, -EADDRNOTAVAIL)) {
log_debug_errno(r, "Failed to detect whether %s exists, skipping: %m", name);
continue;
- } else if (r > 0) {
+ } else if (r != 0) {
log_debug("Native unit for %s already exists, skipping.", name);
continue;
}