aboutsummaryrefslogtreecommitdiffstats
path: root/tools/check/check_hotplug
diff options
context:
space:
mode:
Diffstat (limited to 'tools/check/check_hotplug')
-rw-r--r--tools/check/check_hotplug4
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/check/check_hotplug b/tools/check/check_hotplug
index 61feb4c6a6..aaedb767bf 100644
--- a/tools/check/check_hotplug
+++ b/tools/check/check_hotplug
@@ -6,8 +6,10 @@ function error {
echo ' *** Check for the hotplug scripts (hotplug) FAILED'
exit 1
}
+[ -x "$(which udevinfo)" ] && \
+ UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
-if [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
+if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
exit 0
fi