[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] Changes check for "udev", so that it works on debian sid (that does not



# HG changeset patch
# User emellor@xxxxxxxxxxxxxxxxxxxxxx
# Node ID dd50b17dc60ffeab5b98b3c9b7e6ee68f5f1a984
# Parent  ff18a169e866cae280b457375127b68666231744
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@xxxxxxxxxx>

diff -r ff18a169e866 -r dd50b17dc60f install.sh
--- a/install.sh        Mon Nov 21 15:56:39 2005
+++ b/install.sh        Mon Nov 21 16:03:21 2005
@@ -27,7 +27,10 @@
 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 -r ff18a169e866 -r dd50b17dc60f tools/check/check_hotplug
--- a/tools/check/check_hotplug Mon Nov 21 15:56:39 2005
+++ b/tools/check/check_hotplug Mon Nov 21 16:03:21 2005
@@ -6,8 +6,10 @@
    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
 

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.