[PATCH] udev: sync udev rules directories with systemd units directories

William Hubbs <[email protected]>
Newsgroups gmane.linux.hotplug.devel
Message-ID <[email protected]>
From: Michał Górny <[email protected]>

This adds /usr/lib, /usr/local/lib, and /lib (if split-usr is enabled)
to the directories where udev searches for rules.d. This brings udev in
line with how systemd searches for units and it is also needed if
split-usr is enabled because other software packages currently install
rules in /lib/udev/rules.d.
---
 src/udev/udev-rules.c |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/src/udev/udev-rules.c b/src/udev/udev-rules.c
index b5b54dd..784d25e 100644
--- a/src/udev/udev-rules.c
+++ b/src/udev/udev-rules.c
@@ -1759,7 +1759,12 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
 
         rules->dirs = strv_new(TEST_PREFIX SYSCONFDIR "/udev/rules.d",
                                TEST_PREFIX "/run/udev/rules.d",
+                               TEST_PREFIX "/usr/local/lib/udev/rules.d",
                                TEST_PREFIX UDEVLIBEXECDIR "/rules.d",
+                               TEST_PREFIX "/usr/lib/udev/rules.d",
+#ifdef HAVE_SPLIT_USR
+                               TEST_PREFIX "/lib/udev/rules.d",
+#endif
                                NULL);
         if (!rules->dirs) {
                 log_error("failed to build config directory array");
-- 
1.7.8.6

--
To unsubscribe from this list: send the line "unsubscribe linux-hotplug" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.