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 <[email protected]>
Closes: openzfs#429
  • Loading branch information
Darik Horn authored and Rudd-O committed Feb 1, 2012
1 parent e0cf7af commit 5e44270
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion cmd/zpool_id/zpool_id
Original file line number Diff line number Diff line change
@@ -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 5e44270

Please sign in to comment.