# HG changeset patch
# User Keir Fraser <keir.fraser@xxxxxxxxxx>
# Date 1246531098 -3600
# Node ID 82b0f51763777b4039b2c0889f1b139059dcdb39
# Parent b2ddeb734ca7e65ecf388cccc8aeed7cf564cce3
buikd: Fix the detection of udev with udevadm version < 128
Signed-off-by: Marc-A. Dahlhaus <mad@xxxxxx>
xen-unstable changeset: 19878:c964dd391c7d
xen-unstable date: Thu Jul 02 11:31:00 2009 +0100
---
install.sh | 3 ++-
tools/check/check_udev | 3 ++-
tools/hotplug/Linux/Makefile | 10 ++++++----
3 files changed, 10 insertions(+), 6 deletions(-)
diff -r b2ddeb734ca7 -r 82b0f5176377 install.sh
--- a/install.sh Mon Jun 29 11:16:50 2009 +0100
+++ b/install.sh Thu Jul 02 11:38:18 2009 +0100
@@ -30,7 +30,8 @@ echo "Installing Xen from '$src' to '$ds
[ -x "$(which udevinfo)" ] && \
UDEV_VERSION=$(udevinfo -V | sed -e 's/^[^0-9]*
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/')
-[ -z "$UDEV_VERSION" -a -x /sbin/udevadm ] && UDEV_VERSION=$(/sbin/udevadm -V)
+[ -z "$UDEV_VERSION" -a -x /sbin/udevadm ] && \
+ UDEV_VERSION=$(/sbin/udevadm info -V | awk '{print $NF}')
if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
echo " - installing for udev-based system"
diff -r b2ddeb734ca7 -r 82b0f5176377 tools/check/check_udev
--- a/tools/check/check_udev Mon Jun 29 11:16:50 2009 +0100
+++ b/tools/check/check_udev Thu Jul 02 11:38:18 2009 +0100
@@ -8,7 +8,8 @@ OpenBSD|NetBSD|FreeBSD)
has_or_fail vnconfig
;;
Linux)
- has /sbin/udevadm && udevver=`/sbin/udevadm -V`
+ has /sbin/udevadm && \
+ udevver=`/sbin/udevadm info -V | awk '{print $NF}'`
[ -z "$udevver" ] && has_or_fail udevinfo && \
udevver=`udevinfo -V | awk '{print $NF}'`
[ "$udevver" -ge 59 ] 2>/dev/null || \
diff -r b2ddeb734ca7 -r 82b0f5176377 tools/hotplug/Linux/Makefile
--- a/tools/hotplug/Linux/Makefile Mon Jun 29 11:16:50 2009 +0100
+++ b/tools/hotplug/Linux/Makefile Thu Jul 02 11:38:18 2009 +0100
@@ -28,10 +28,12 @@ XEN_HOTPLUG_DIR = /etc/hotplug
XEN_HOTPLUG_DIR = /etc/hotplug
XEN_HOTPLUG_SCRIPTS = xen-backend.agent
+UDEVVER = 0
ifeq ($(shell [ -x /sbin/udevadm ] && echo 1),1)
-UDEVINFO = /sbin/udevadm
-else
-UDEVINFO = /usr/bin/udevinfo
+UDEVVER = $(shell /sbin/udevadm info -V | sed -e 's/^[^0-9]*
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' )
+endif
+ifeq ($(shell [ -x /usr/bin/udevinfo ] && echo 1),1)
+UDEVVER = $(shell /usr/bin/udevinfo -V | sed -e 's/^[^0-9]*
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/' )
endif
UDEV_RULES_DIR = /etc/udev
@@ -42,7 +44,7 @@ ifeq ($(findstring $(DI),$(DE)),$(DI))
ifeq ($(findstring $(DI),$(DE)),$(DI))
HOTPLUGS=install-hotplug install-udev
else
-ifeq ($(shell [ -x $(UDEVINFO) -a `$(UDEVINFO) -V | sed -e 's/^[^0-9]*
\([0-9]\{1,\}\)[^0-9]\{0,\}/\1/'` -ge 059 ] && echo 1),1)
+ifeq ($(shell [ $(UDEVVER) -ge 059 ] && echo 1),1)
HOTPLUGS=install-udev
else
HOTPLUGS=install-hotplug
_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog
|