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

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



# HG changeset patch
# User Roger Pau Monne <roger.pau@xxxxxxxxxxxxx>
# Date 1329814249 -3600
# Node ID eea0d53efff1fa94266026088cd5498921598df6
# Parent  40f8487cacc807bb6f9d642b4fe75deaf1087833
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 40f8487cacc8 -r eea0d53efff1 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
@@ -53,6 +53,26 @@ fi
 # Check if brctl is present
 hash brctl > /dev/null 2>&1 || echo "Warning: brctl not found"
 
+# 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®.