All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons
@ 2012-02-21  9:19 Roger Pau Monne
  2012-02-21  9:19 ` [PATCH 1 of 2] Linux/init: check for brctl at xencommons Roger Pau Monne
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21  9:19 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson

Move udev and brctl checks previously in tools/check to xencommons.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 1 of 2] Linux/init: check for brctl at xencommons
  2012-02-21  9:19 [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons Roger Pau Monne
@ 2012-02-21  9:19 ` Roger Pau Monne
  2012-02-24 12:06   ` Ian Jackson
  2012-02-21  9:19 ` [PATCH 2 of 2] Linux/init: check for udev >= 59 " Roger Pau Monne
  2012-02-23 15:06 ` [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons Roger Pau Monné
  2 siblings, 1 reply; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21  9:19 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson

# HG changeset patch
# User Roger Pau Monne <roger.pau@entel.upc.edu>
# Date 1329811412 -3600
# Node ID 40f8487cacc807bb6f9d642b4fe75deaf1087833
# Parent  c157f98ab8ff6e2e8b35cc6135f636896cb4f623
Linux/init: check for brctl at xencommons

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

Signed-off-by: Roger Pau Monne <roger.pau@entel.upc.edu>

diff -r c157f98ab8ff -r 40f8487cacc8 tools/hotplug/Linux/init.d/xencommons
--- a/tools/hotplug/Linux/init.d/xencommons	Tue Feb 21 08:46:04 2012 +0100
+++ b/tools/hotplug/Linux/init.d/xencommons	Tue Feb 21 09:03:32 2012 +0100
@@ -50,6 +50,9 @@ if test -f /proc/xen/capabilities && \
 	exit 0
 fi
 
+# Check if brctl is present
+hash brctl > /dev/null 2>&1 || echo "Warning: brctl not found"
+
 do_start () {
         local time=0
 	local timeout=30

^ permalink raw reply	[flat|nested] 6+ messages in thread

* [PATCH 2 of 2] Linux/init: check for udev >= 59 at xencommons
  2012-02-21  9:19 [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons Roger Pau Monne
  2012-02-21  9:19 ` [PATCH 1 of 2] Linux/init: check for brctl at xencommons Roger Pau Monne
@ 2012-02-21  9:19 ` Roger Pau Monne
  2012-02-23 15:06 ` [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons Roger Pau Monné
  2 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monne @ 2012-02-21  9:19 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson

# HG changeset patch
# User Roger Pau Monne <roger.pau@entel.upc.edu>
# 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@entel.upc.edu>

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons
  2012-02-21  9:19 [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons Roger Pau Monne
  2012-02-21  9:19 ` [PATCH 1 of 2] Linux/init: check for brctl at xencommons Roger Pau Monne
  2012-02-21  9:19 ` [PATCH 2 of 2] Linux/init: check for udev >= 59 " Roger Pau Monne
@ 2012-02-23 15:06 ` Roger Pau Monné
  2 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monné @ 2012-02-23 15:06 UTC (permalink / raw)
  To: xen-devel; +Cc: ian.jackson

I've sent an updated version of this, so forget about this series.

Thanks, Roger.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1 of 2] Linux/init: check for brctl at xencommons
  2012-02-21  9:19 ` [PATCH 1 of 2] Linux/init: check for brctl at xencommons Roger Pau Monne
@ 2012-02-24 12:06   ` Ian Jackson
  2012-02-24 13:09     ` Roger Pau Monné
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Jackson @ 2012-02-24 12:06 UTC (permalink / raw)
  To: Roger Pau Monne; +Cc: xen-devel@lists.xen.org

Roger Pau Monne writes ("[PATCH 1 of 2] Linux/init: check for brctl at xencommons"):
> Linux/init: check for brctl at xencommons
...
> +# Check if brctl is present
> +hash brctl > /dev/null 2>&1 || echo "Warning: brctl not found"

I using think "type" would be more idomatic than "hash".

I think the warning message should go to stderr and mention
xencommons.  I was going to suggest that you should use the lsb init
function "log_warning_msg" but I see that xencommons does not
currently source /lib/lsb/init-functions.  But perhaps it should.

http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html

Ian.

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH 1 of 2] Linux/init: check for brctl at xencommons
  2012-02-24 12:06   ` Ian Jackson
@ 2012-02-24 13:09     ` Roger Pau Monné
  0 siblings, 0 replies; 6+ messages in thread
From: Roger Pau Monné @ 2012-02-24 13:09 UTC (permalink / raw)
  To: Ian Jackson; +Cc: xen-devel@lists.xen.org

2012/2/24 Ian Jackson <Ian.Jackson@eu.citrix.com>:
> Roger Pau Monne writes ("[PATCH 1 of 2] Linux/init: check for brctl at xencommons"):
>> Linux/init: check for brctl at xencommons
> ...
>> +# Check if brctl is present
>> +hash brctl > /dev/null 2>&1 || echo "Warning: brctl not found"

(this is a previous version of the patch, see
http://lists.xen.org/archives/html/xen-devel/2012-02/msg02108.html for
the new series)

> I using think "type" would be more idomatic than "hash".

Ok, I will replace hash with type

> I think the warning message should go to stderr and mention
> xencommons.  I was going to suggest that you should use the lsb init
> function "log_warning_msg" but I see that xencommons does not
> currently source /lib/lsb/init-functions.  But perhaps it should.

I usually use OpenRC under Linux, and since it doesn't like the stock
xencommons file I use a custom one. If you think it is ok to include
/lib/lsb/init-functions I can update the series to include that and
make use of log_warning_msg.

> http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/iniscrptfunc.html
>
> Ian.

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

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2012-02-24 13:09 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-02-21  9:19 [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons Roger Pau Monne
2012-02-21  9:19 ` [PATCH 1 of 2] Linux/init: check for brctl at xencommons Roger Pau Monne
2012-02-24 12:06   ` Ian Jackson
2012-02-24 13:09     ` Roger Pau Monné
2012-02-21  9:19 ` [PATCH 2 of 2] Linux/init: check for udev >= 59 " Roger Pau Monne
2012-02-23 15:06 ` [PATCH 0 of 2] Linux/init: add udev and brctl checks to xencommons Roger Pau Monné

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.