summaryrefslogtreecommitdiff
path: root/meta/recipes-core
diff options
context:
space:
mode:
authorOtavio Salvador <otavio@ossystems.com.br>2012-11-27 11:55:02 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-12-03 14:21:31 +0000
commit96daf1b3105e17a67acb5027d0418b2ac28b6820 (patch)
tree149855cab20cff5130656d5136cb2d0c855fae1a /meta/recipes-core
parent5037fef73e2c4d31b06a4422ad1d54f777fe00fa (diff)
downloadopenembedded-core-96daf1b3105e17a67acb5027d0418b2ac28b6820.tar.gz
openembedded-core-96daf1b3105e17a67acb5027d0418b2ac28b6820.tar.bz2
openembedded-core-96daf1b3105e17a67acb5027d0418b2ac28b6820.zip
initramfs-framework: udev: Handle alternative binary paths
This allows use of udev daemon for different installation destinations so allowing use of udev's from systemd code for initramfs. Signed-off-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Saul Wold <sgw@linux.intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core')
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework/udev25
-rw-r--r--meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb2
2 files changed, 21 insertions, 6 deletions
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework/udev b/meta/recipes-core/initrdscripts/initramfs-framework/udev
index 15a1d5ba06..7fbcc61d9c 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework/udev
+++ b/meta/recipes-core/initrdscripts/initramfs-framework/udev
@@ -1,10 +1,25 @@
#!/bin/sh
-# Copyright (C) 2011 O.S. Systems Software LTDA.
+# Copyright (C) 2011, 2012 O.S. Systems Software LTDA.
# Licensed on MIT
+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`
+
udev_enabled() {
- if [ ! -e /lib/udev/udevd ]; then
- debug "/lib/udev/udev doesn't exist"
+ if [ -z "$_UDEV_DAEMON" ]; then
+ msg "WARNING: Cannot find the udev daemon; daemon will not be started in initramfs."
return 1
fi
@@ -14,9 +29,9 @@ udev_enabled() {
udev_run() {
mkdir -p /run
- /lib/udev/udevd --daemon > /dev/null
+ $_UDEV_DAEMON --daemon
udevadm trigger --action=add
udevadm settle
- killall udevd 2>/dev/null
+ killall `basename $_UDEV_DAEMON` 2>/dev/null
}
diff --git a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
index 45d6592bc3..cbb4a39611 100644
--- a/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
+++ b/meta/recipes-core/initrdscripts/initramfs-framework_1.0.bb
@@ -3,7 +3,7 @@ LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
RDEPENDS = "busybox"
-PR = "r1"
+PR = "r2"
inherit allarch