From 036bc1a9509f5cf495817bc33624b8a4069e9f9f Mon Sep 17 00:00:00 2001 From: Ian Stakenvicius Date: Wed, 12 Dec 2012 09:00:10 -0500 Subject: Changed --enable-split-usr to add hard-coded paths for rules etc in both / and /usr This is necessary because the code originally defined paths assuming UDEV_LIBEXECDIR was /usr prefixed, and also that udevrulesdir was located in /etc. Since (1) both of these defaults have changed, and (2) they could be set to more or less anything, we want to ensure that there is support for the standard paths as well, irrespective of what UDEV_LIBEXECDIR and UDEV_RULES_DIR are set to. Signed-off-by: Anthony G. Basile --- src/udev/udev-event.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/udev/udev-event.c') diff --git a/src/udev/udev-event.c b/src/udev/udev-event.c index 46e7578d0d..cbcb3f5ab2 100644 --- a/src/udev/udev-event.c +++ b/src/udev/udev-event.c @@ -687,9 +687,12 @@ int udev_event_spawn(struct udev_event *event, } /* allow programs in /usr/lib/udev/ to be called without the path */ + /* NOTE - paths need reworking, see note in udev-rules.c */ if (argv[0][0] != '/') { util_strscpyl(program, sizeof(program), UDEV_LIBEXEC_DIR "/", argv[0], NULL); #ifdef HAVE_SPLIT_USR + if(access(program, X_OK)) + util_strscpyl(program, sizeof(program), "/usr/lib/udev/", argv[0], NULL); if(access(program, X_OK)) util_strscpyl(program, sizeof(program), "/lib/udev/", argv[0], NULL); #endif -- cgit v1.2.3-54-g00ecf