Support path_id changes in udev 174.
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: #429
This commit is contained in:
parent
590338f63e
commit
9c8254f6f9
|
@ -1,9 +1,17 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
|
CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
|
||||||
PATH_ID=${PATH_ID:-/lib/udev/path_id}
|
|
||||||
AWK=${AWK:-/usr/bin/awk}
|
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() {
|
die() {
|
||||||
echo "Error: $*"
|
echo "Error: $*"
|
||||||
exit 1
|
exit 1
|
||||||
|
|
Loading…
Reference in New Issue