From: Murillo Fernandes Bernardes <mfb@br.ibm.com>
To: xen-devel@lists.xensource.com
Subject: [PATCH] Check for udev on install.sh using udevinfo
Date: Thu, 17 Nov 2005 10:48:05 -0200 [thread overview]
Message-ID: <200511171048.06043.mfb@br.ibm.com> (raw)
[-- 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
reply other threads:[~2005-11-17 12:48 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200511171048.06043.mfb@br.ibm.com \
--to=mfb@br.ibm.com \
--cc=xen-devel@lists.xensource.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.