mirror of
https://git.yoctoproject.org/poky
synced 2026-05-09 05:29:32 +00:00
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. (From OE-Core rev: dcf95bed1d9152d9cdb908b4e131e1c7c46cec84) 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>
This commit is contained in:
committed by
Richard Purdie
parent
0140519ba1
commit
3dc7f6d05e
@@ -1,10 +1,25 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# Copyright (C) 2011 O.S. Systems Software LTDA.
|
# Copyright (C) 2011, 2012 O.S. Systems Software LTDA.
|
||||||
# Licensed on MIT
|
# 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() {
|
udev_enabled() {
|
||||||
if [ ! -e /lib/udev/udevd ]; then
|
if [ -z "$_UDEV_DAEMON" ]; then
|
||||||
debug "/lib/udev/udev doesn't exist"
|
msg "WARNING: Cannot find the udev daemon; daemon will not be started in initramfs."
|
||||||
return 1
|
return 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@@ -14,9 +29,9 @@ udev_enabled() {
|
|||||||
udev_run() {
|
udev_run() {
|
||||||
mkdir -p /run
|
mkdir -p /run
|
||||||
|
|
||||||
/lib/udev/udevd --daemon > /dev/null
|
$_UDEV_DAEMON --daemon
|
||||||
udevadm trigger --action=add
|
udevadm trigger --action=add
|
||||||
udevadm settle
|
udevadm settle
|
||||||
|
|
||||||
killall udevd 2>/dev/null
|
killall `basename $_UDEV_DAEMON` 2>/dev/null
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ LICENSE = "MIT"
|
|||||||
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
|
||||||
RDEPENDS = "busybox"
|
RDEPENDS = "busybox"
|
||||||
|
|
||||||
PR = "r1"
|
PR = "r2"
|
||||||
|
|
||||||
inherit allarch
|
inherit allarch
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user