aboutsummaryrefslogtreecommitdiffstats
path: root/etc/udev/rules.d/60-zpool.rules.in
diff options
context:
space:
mode:
authorDarik Horn <[email protected]>2011-06-17 10:02:36 -0500
committerBrian Behlendorf <[email protected]>2011-06-17 10:11:29 -0700
commitb9f27ee76582fa7826ca930889f8c281430c6b7a (patch)
tree72cad6900cbef9218c3dcc55e430672b939f9005 /etc/udev/rules.d/60-zpool.rules.in
parente130330a874f4dec6628c094455180d4113c6aa1 (diff)
Fix autoconf variable substitution in udev rules.
Change the variable substitution in the udev rule templates according to the method described in the Autoconf manual; Chapter 4.7.2: Installation Directory Variables. The udev rules are improperly generated if the bindir parameter overrides the prefix parameter during configure. For example: # ./configure --prefix=/usr/local --bindir=/opt/zfs/bin The udev helper is installed as /opt/zfs/bin/zpool_id, but the corresponding udev rule has a different path: # /usr/local/etc/udev/rules.d/60-zpool.rules ENV{DEVTYPE}=="disk", IMPORT{program}="/usr/local/bin/zpool_id -d %p" The @bindir@ variable expands to "${exec_prefix}/bin", so it cannot be used instead of @prefix@ directly. This also applies to the zvol_id helper. Closes #283.
Diffstat (limited to 'etc/udev/rules.d/60-zpool.rules.in')
-rw-r--r--etc/udev/rules.d/60-zpool.rules.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/udev/rules.d/60-zpool.rules.in b/etc/udev/rules.d/60-zpool.rules.in
index fc1a1d1f4..6e5a727fe 100644
--- a/etc/udev/rules.d/60-zpool.rules.in
+++ b/etc/udev/rules.d/60-zpool.rules.in
@@ -2,7 +2,7 @@
# /etc/udev/rules.d/60-zpool.rules
#
-ENV{DEVTYPE}=="disk", IMPORT{program}="@prefix@/bin/zpool_id -d %p"
+ENV{DEVTYPE}=="disk", IMPORT{program}="@bindir@/zpool_id -d %p"
KERNEL=="*[!0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}"
KERNEL=="*[0-9]", ENV{SUBSYSTEM}=="block", ENV{ID_ZPOOL}=="?*", SYMLINK+="$env{ID_ZPOOL_PATH}-part%n"