WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

Re: [Xen-devel] Change check for udev on install.sh and check_hotplug

To: Murillo Fernandes Bernardes <mfb@xxxxxxxxxx>
Subject: Re: [Xen-devel] Change check for udev on install.sh and check_hotplug
From: Ewan Mellor <ewan@xxxxxxxxxxxxx>
Date: Fri, 18 Nov 2005 12:56:00 +0000
Cc: xen-devel@xxxxxxxxxxxxxxxxxxx
Delivery-date: Fri, 18 Nov 2005 12:56:06 +0000
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <200511180030.49761.mfb@xxxxxxxxxx>
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
References: <200511180030.49761.mfb@xxxxxxxxxx>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: Mutt/1.5.9i
On Fri, Nov 18, 2005 at 12:30:49AM -0200, Murillo Fernandes Bernardes wrote:

> 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>
> 
> -- 
> Murillo Fernandes Bernardes

> # HG changeset patch
> # User root@xxxxxxxxxxxxxxxxxxxxx
> # Node ID 54911570fae54eda445880eb7bf31926964717dd
> # Parent  9bf6f907b3ff0261902f06d261f76c1bd12af9f5
> Changes check for "udev", so that it works on debian (that does not have 
> /sbin/udev anymore).
> 
> Tested on Debian Sid and FC4.
> 
> diff -r 9bf6f907b3ff -r 54911570fae5 install.sh
> --- a/install.sh      Wed Nov 16 10:29:52 2005
> +++ b/install.sh      Wed Nov 16 21:41:26 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
> +
> +UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
> +
> +if [ -x /sbin/udevd ] && [ ! -z $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 9bf6f907b3ff -r 54911570fae5 tools/check/check_hotplug
> --- a/tools/check/check_hotplug       Wed Nov 16 10:29:52 2005
> +++ b/tools/check/check_hotplug       Wed Nov 16 21:41:26 2005
> @@ -7,7 +7,9 @@
>     exit 1
>  }
>  
> -if [ -x /sbin/udev ] && [ ! -z `/sbin/udev -V` ] && [ `/sbin/udev -V` -ge 
> 059 ]; then
> +UDEV_VERSION=$(udevinfo -V | sed -e 's/^.*\s\([0-9]\+\)[^0-9]*/\1/')
> +
> +if [ -x /sbin/udevd ] && [ ! -z $UDEV_VERSION ] && [ $UDEV_VERSION -ge 059 
> ]; then
>    exit 0
>  fi

Isn't this going to issue a "udevinfo: command not found" message if udev
isn't installed?  It would be better if you checked for the existence of
udevinfo before trying to run it.

Ewan.

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

<Prev in Thread] Current Thread [Next in Thread>