All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Check for udev on install.sh using udevinfo
@ 2005-11-17 12:48 Murillo Fernandes Bernardes
  0 siblings, 0 replies; only message in thread
From: Murillo Fernandes Bernardes @ 2005-11-17 12:48 UTC (permalink / raw)
  To: xen-devel

[-- Attachment #1: Type: text/plain, Size: 214 bytes --]

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@br.ibm.com>

-- 
Murillo Fernandes Bernardes
IBM Linux Technology Center

[-- Attachment #2: install-udev-check.patch --]
[-- Type: text/x-diff, Size: 1332 bytes --]

# 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
 

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

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

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-11-17 12:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-11-17 12:48 [PATCH] Check for udev on install.sh using udevinfo Murillo Fernandes Bernardes

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.