Skip to content

Commit

Permalink
Support path_id changes in udev 174.
Browse files Browse the repository at this point in the history
The /lib/udev/path_id helper became a builtin command in the udev 174
release, so test whether path_id is external in the zpool_id script.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes: openzfs#429
  • Loading branch information
dajhorn authored and behlendorf committed Dec 5, 2011
1 parent 590338f commit 9c8254f
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/zpool_id/zpool_id
@@ -1,9 +1,17 @@
#!/bin/bash

CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
PATH_ID=${PATH_ID:-/lib/udev/path_id}
AWK=${AWK:-/usr/bin/awk}

if [ -z "${PATH_ID}" ]; then
# The path_id helper became a builtin command in udev 174.
if [ -x '/lib/udev/path_id' ]; then
PATH_ID='/lib/udev/path_id'
else
PATH_ID='udevadm test-builtin path_id'
fi
fi

die() {
echo "Error: $*"
exit 1
Expand Down

0 comments on commit 9c8254f

Please sign in to comment.