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

[Xen-devel] [PATCH 5 of 5] Linux/init: check for udev >= 59 at xencommons



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1329814249 -3600
# Node ID 9fa89fb4ee2b3a587ec537c404a270f0c0e2169d
# Parent  6c6c59861319b2be13fde935e20b62ead39905ca
Linux/init: check for udev >= 59 at xencommons

Check for udev at xencommons, since hotplug scripts use it.

Signed-off-by: Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>

diff -r 6c6c59861319 -r 9fa89fb4ee2b tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons     Tue Feb 21 09:03:32 2012 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons     Tue Feb 21 09:50:49 2012 +0100
@@ -58,6 +58,26 @@ do
        hash $tool > /dev/null 2>&1 || echo "Warning: $tool not found"
 done
 
+# Check for udev >= 59
+if ! hash udevadm > /dev/null 2>&1
+then
+       if ! hash udevinfo > /dev/null 2>&1
+       then
+               echo "Warning: unable to find udevadm or udevinfo"
+       else
+               udevver=`udevinfo -V | awk '{print $NF}'`
+       fi
+else
+       udevver=`udevadm info -V | awk '{print $NF}'`
+fi
+if test -z "${udevver}" || test "${udevver}" -lt 59
+then
+       if ! hash hotplug > /dev/null 2>&1
+       then
+               echo "Warning: udev is too old, upgrade to version 59 or later"
+       fi
+fi
+
 do_start () {
         local time=0
        local timeout=30

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

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