summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2014-02-11 21:06:51 +0100
committerLennart Poettering <lennart@poettering.net>2014-02-11 21:06:51 +0100
commitb87633c4b20e3221748d6c98336cf6c85123cd66 (patch)
treeeb91de9d3b69e3d7948935fea1bc32286f876dcd /src
parent2fcb3af6a2931cfc74c8602ab68f00bc99b61b1c (diff)
machined: fix enumeration of existing machines on restart
Diffstat (limited to 'src')
-rw-r--r--src/machine/machined.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/machine/machined.c b/src/machine/machined.c
index 6eeb05316..20e6f7cd6 100644
--- a/src/machine/machined.c
+++ b/src/machine/machined.c
@@ -106,6 +106,10 @@ int manager_enumerate_machines(Manager *m) {
if (!dirent_is_file(de))
continue;
+ /* Ignore symlinks that map the unit name to the machine */
+ if (startswith(de->d_name, "unit:"))
+ continue;
+
k = manager_add_machine(m, de->d_name, &machine);
if (k < 0) {
log_error("Failed to add machine by file name %s: %s", de->d_name, strerror(-k));