aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2005-11-21 17:03:21 +0100
committeremellor@leeni.uk.xensource.com <emellor@leeni.uk.xensource.com>2005-11-21 17:03:21 +0100
commit20e3f38adeaae62c4624b0649ddce509066c49c7 (patch)
tree939017eff5bf3dfa8b13a6cdea12df493725bb99
parent9ba9cbdb3fb55274a25092f52d60545474beae4d (diff)
downloadxen-20e3f38adeaae62c4624b0649ddce509066c49c7.tar.gz
xen-20e3f38adeaae62c4624b0649ddce509066c49c7.tar.bz2
xen-20e3f38adeaae62c4624b0649ddce509066c49c7.zip
Changes check for "udev", so that it works on debian sid (that does not
have /sbin/udev anymore). Signed-off-by: Murillo F. Bernardes <mfb@br.ibm.com>
-rwxr-xr-xinstall.sh5
-rw-r--r--tools/check/check_hotplug4
2 files changed, 7 insertions, 2 deletions
diff --git a/install.sh b/install.sh
index 46e22abe6c..e7dbfc24b6 100755
--- a/install.sh
+++ b/install.sh
@@ -27,7 +27,10 @@ echo "Installing Xen from '$src' to '$dst'..."
cp -fdRL $src/etc/init.d/* $dst/etc/init.d/
echo "All done."
-if [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev -V` -ge 059 ]; then
+[ -x "$(which udevinfo)" ] && \
+ UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
+
+if [ -n "$UDEV_VERSION" ] && [ $UDEV_VERSION -ge 059 ]; then
cp -f $src/etc/udev/rules.d/*.rules $dst/etc/udev/rules.d/
else
cp -f $src/etc/hotplug/*.agent $dst/etc/hotplug/
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