summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
590338f)
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
#!/bin/bash
CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
#!/bin/bash
CONFIG=${CONFIG:-/etc/zfs/zdev.conf}
-PATH_ID=${PATH_ID:-/lib/udev/path_id}
+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
die() {
echo "Error: $*"
exit 1