[systemd-devel] [PATCH] install: Assume *.wants symlinks have the same name as their target for scalability.

david at davidstrauss.net david at davidstrauss.net
Wed Dec 11 15:54:39 PST 2013


From: David Strauss <david at davidstrauss.net>

---
 src/shared/install.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/shared/install.c b/src/shared/install.c
index 17e8a75..14c0f4b 100644
--- a/src/shared/install.c
+++ b/src/shared/install.c
@@ -423,6 +423,11 @@ static int find_symlinks_fd(
                         bool found_path, found_dest, b = false;
                         int q;
 
+                        /* Skip symlinks with a different basename than
+                         * the target unit */
+                        if (!streq(basename(de->d_name), name))
+                                continue;
+
                         /* Acquire symlink name */
                         p = path_make_absolute(de->d_name, path);
                         if (!p)
-- 
1.8.3.1



More information about the systemd-devel mailing list