Fixed an issue reported by Graeme Hattan that the udev
authorBernd Porr <berndporr@f2s.com>
Mon, 23 Apr 2012 12:15:03 +0000 (13:15 +0100)
committerBernd Porr <berndporr@f2s.com>
Mon, 23 Apr 2012 12:15:03 +0000 (13:15 +0100)
rules were installed in the etc directory and not the lib.
See also:
http://lintian.debian.org/tags/udev-rule-in-etc.html
./configure --with-udev-hotplug=/lib places now all
files in /lib. The scripts were wrongly prefixed with the
sysconf directory which is /etc but should be /lib.
The directory is now also taken from --with-udev-hotplug=/lib.

configure.ac

index 88dabf564daf7711d3187d0a6be1dd0c8dc17674..2d610cff1006a7828ebe1655e5c32ae7a4809f55 100644 (file)
@@ -202,7 +202,6 @@ AC_ARG_WITH([udev-hotplug],
        [ENABLE_UDEVHOTPLUG=$withval], [ENABLE_UDEVHOTPLUG="no"])
 AM_CONDITIONAL(INSTALL_UDEVHOTPLUG, [test "$ENABLE_UDEVHOTPLUG" != "no"])
 if test "$ENABLE_UDEVHOTPLUG" != "no"; then
-       udevrulesdir="\${sysconfdir}/udev/rules.d/"
        if  test "$ENABLE_UDEVHOTPLUG" == "yes"; then
                AC_MSG_ERROR([udev-hotplug needs a path as an argument (usually: --enable-udev-hotplug=/lib).])
        fi
@@ -212,6 +211,7 @@ if test "$ENABLE_UDEVHOTPLUG" != "no"; then
        if test "$sysconfdir" != "/etc"; then
                AC_MSG_WARN([udev hotplug works only if sysconfdir is set to /etc.])
        fi
+       udevrulesdir="$ENABLE_UDEVHOTPLUG/udev/rules.d/"
        udevfirmwaredir="$ENABLE_UDEVHOTPLUG/firmware"
        udevscriptsdir="$ENABLE_UDEVHOTPLUG/udev"
        AC_SUBST(udevrulesdir)