summaryrefslogtreecommitdiff
path: root/src/udev/udev-event.c
diff options
context:
space:
mode:
authorEgor Y. Egorov <egorov_egor@bk.ru>2012-08-08 12:43:53 -0500
committerRichard Yao <ryao@cs.stonybrook.edu>2012-11-20 17:18:12 -0500
commit20d68c2ae8cb63539540230f724c2aafdf8bb459 (patch)
tree5e13d35f9401070bbe0332cc4e72397444dbbc66 /src/udev/udev-event.c
parenta59b727179494c22497d8fa8776ba67f35c26795 (diff)
udev: allow helpers to be in /lib/udev
Signed-off-by: Richard Yao <ryao@gentoo.org>
Diffstat (limited to 'src/udev/udev-event.c')
-rw-r--r--src/udev/udev-event.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c
index 33ed477637..30c3771fe6 100644
--- a/src/udev/udev-event.c
+++ b/src/udev/udev-event.c
@@ -689,6 +689,10 @@ int udev_event_spawn(struct udev_event *event,
/* allow programs in /usr/lib/udev/ to be called without the path */
if (argv[0][0] != '/') {
util_strscpyl(program, sizeof(program), UDEVLIBEXECDIR "/", argv[0], NULL);
+#ifdef HAVE_SPLIT_USR
+ if(access(program, X_OK))
+ util_strscpyl(program, sizeof(program), "/lib/udev/", argv[0], NULL);
+#endif
argv[0] = program;
}