From mboxrd@z Thu Jan 1 00:00:00 1970 From: Murillo Fernandes Bernardes Subject: [PATCH] Check for udev on install.sh using udevinfo Date: Thu, 17 Nov 2005 10:48:05 -0200 Message-ID: <200511171048.06043.mfb@br.ibm.com> Mime-Version: 1.0 Content-Type: Multipart/Mixed; boundary="Boundary-00=_GwHfDSSzGftF7do" Return-path: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com List-Id: xen-devel@lists.xenproject.org --Boundary-00=_GwHfDSSzGftF7do Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Changes check for "udev", so that it works on debian sid (that does not have /sbin/udev anymore). Signed-off-by: Murillo F. Bernardes -- Murillo Fernandes Bernardes IBM Linux Technology Center --Boundary-00=_GwHfDSSzGftF7do Content-Type: text/x-diff; charset="iso-8859-1"; name="install-udev-check.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="install-udev-check.patch" # HG changeset patch # User root@localhost.localdomain # 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 --Boundary-00=_GwHfDSSzGftF7do Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Xen-devel mailing list Xen-devel@lists.xensource.com http://lists.xensource.com/xen-devel --Boundary-00=_GwHfDSSzGftF7do--