diff options
-rwxr-xr-x | cmd/zpool_id/zpool_id | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/cmd/zpool_id/zpool_id b/cmd/zpool_id/zpool_id index 9d2a84549..a67beaca0 100755 --- a/cmd/zpool_id/zpool_id +++ b/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 |