Files
xen/tools/check/check_udev
T
Keir Fraser 6cba5a2ed1 Fix buildsystem to detect udev > version 124
udev removed the udevinfo symlink from versions higher than 123 and
xen's build-system could not detect if udev is in place and has the
required version.

Signed-off-by: Marc-A. Dahlhaus <mad@wol.de>
2009-06-25 13:02:37 +01:00

22 lines
402 B
Bash
Executable File

#!/bin/sh
# CHECK-INSTALL
. ./funcs.sh
case $OS in
OpenBSD|NetBSD|FreeBSD)
has_or_fail vnconfig
;;
Linux)
has /sbin/udevadm && udevver=`/sbin/udevadm -V`
[ -z "$udevver" ] && has_or_fail udevinfo && \
udevver=`udevinfo -V | awk '{print $NF}'`
[ "$udevver" -ge 59 ] 2>/dev/null || \
has hotplug || \
fail "udev is too old, upgrade to version 59 or later"
;;
*)
fail "unknown OS"
;;
esac