HomeFreeBSD

Fix autoconf variable substitution in udev rules.

Description

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:

  1. ./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:

  1. /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.

Details

Provenance
Darik Horn <dajhorn@vanadac.com>Authored on Jun 17 2011, 3:02 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Jun 17 2011, 5:11 PM
Parents
rGe130330a874f: Handle /etc/mtab -> /proc/mounts symlink
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGb9f27ee76582: Fix autoconf variable substitution in udev rules. (authored by Darik Horn <dajhorn@vanadac.com>).Jun 17 2011, 5:11 PM