From: Ross Burton <ross.burton@intel.com>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH] initramfs-live-boot: handle multiple udev locations
Date: Thu, 17 Jan 2013 16:29:39 +0000 [thread overview]
Message-ID: <1358440179-32242-1-git-send-email-ross.burton@intel.com> (raw)
udevd isn't on $PATH and is in different places depending on what version of
udev is being used. Copy the code from initramfs-framework to search for the
right udevd at boot time instead of hard-coding a location.
Signed-off-by: Ross Burton <ross.burton@intel.com>
---
meta/recipes-core/initrdscripts/files/init-live.sh | 20 +++++++++++++++++++-
1 file changed, 19 insertions(+), 1 deletion(-)
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 0ae359d..f0d4f22 100644
--- a/meta/recipes-core/initrdscripts/files/init-live.sh
+++ b/meta/recipes-core/initrdscripts/files/init-live.sh
@@ -9,6 +9,23 @@ UMOUNT="/bin/umount"
ISOLINUX=""
UNIONFS="no"
+# Copied from initramfs-framework. The core of this script probably should be
+# turned into initramfs-framework modules to reduce duplication.
+udev_daemon() {
+ OPTIONS="/sbin/udevd /lib/udev/udevd /lib/systemd/systemd-udevd"
+
+ for o in $OPTIONS; do
+ if [ -x "$o" ]; then
+ echo $o
+ return 0
+ fi
+ done
+
+ return 1
+}
+
+_UDEV_DAEMON=`udev_daemon`
+
early_setup() {
mkdir -p /proc
mkdir -p /sys
@@ -21,7 +38,8 @@ early_setup() {
mkdir -p /run
mkdir -p /var/run
- /lib/udev/udevd --daemon
+
+ $_UDEV_DAEMON --daemon
udevadm trigger --action=add
}
--
1.7.10.4
reply other threads:[~2013-01-17 16:47 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=1358440179-32242-1-git-send-email-ross.burton@intel.com \
--to=ross.burton@intel.com \
--cc=openembedded-core@lists.openembedded.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox