aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initrdscripts
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2013-01-17 16:29:39 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-18 13:05:33 +0000
commita5de76317112fc065a78a745c2f23775dca15d75 (patch)
treeb0800d4c78a9b972cbc8e79665c50e1ff6e2ddc9 /meta/recipes-core/initrdscripts
parentc34bb3554112cbaeb4e125ff5ed190c0d3bbcf36 (diff)
downloadopenembedded-core-contrib-a5de76317112fc065a78a745c2f23775dca15d75.tar.gz
openembedded-core-contrib-a5de76317112fc065a78a745c2f23775dca15d75.tar.bz2
openembedded-core-contrib-a5de76317112fc065a78a745c2f23775dca15d75.zip
initramfs-live-boot: handle multiple udev locations
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> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-core/initrdscripts')
-rw-r--r--meta/recipes-core/initrdscripts/files/init-live.sh20
1 files changed, 19 insertions, 1 deletions
diff --git a/meta/recipes-core/initrdscripts/files/init-live.sh b/meta/recipes-core/initrdscripts/files/init-live.sh
index 0ae359d6171..f0d4f227a2f 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
}