diff options
| author | Ross Burton <ross.burton@intel.com> | 2013-01-17 16:29:39 +0000 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-18 13:28:06 +0000 |
| commit | e7ebff0a9865cfbb5ce00de095a47a7b12b26196 (patch) | |
| tree | f4a7c2305024c5a60ada317d2f3fe5073a98c86f | |
| parent | 26bddbd41b774395a9af73fb659b8e8792e9c3ad (diff) | |
| download | poky-e7ebff0a9865cfbb5ce00de095a47a7b12b26196.tar.gz | |
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.
(From OE-Core rev: a5de76317112fc065a78a745c2f23775dca15d75)
Signed-off-by: Ross Burton <ross.burton@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-core/initrdscripts/files/init-live.sh | 20 |
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 0ae359d617..f0d4f227a2 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" | |||
| 9 | ISOLINUX="" | 9 | ISOLINUX="" |
| 10 | UNIONFS="no" | 10 | UNIONFS="no" |
| 11 | 11 | ||
| 12 | # Copied from initramfs-framework. The core of this script probably should be | ||
| 13 | # turned into initramfs-framework modules to reduce duplication. | ||
| 14 | udev_daemon() { | ||
| 15 | OPTIONS="/sbin/udevd /lib/udev/udevd /lib/systemd/systemd-udevd" | ||
| 16 | |||
| 17 | for o in $OPTIONS; do | ||
| 18 | if [ -x "$o" ]; then | ||
| 19 | echo $o | ||
| 20 | return 0 | ||
| 21 | fi | ||
| 22 | done | ||
| 23 | |||
| 24 | return 1 | ||
| 25 | } | ||
| 26 | |||
| 27 | _UDEV_DAEMON=`udev_daemon` | ||
| 28 | |||
| 12 | early_setup() { | 29 | early_setup() { |
| 13 | mkdir -p /proc | 30 | mkdir -p /proc |
| 14 | mkdir -p /sys | 31 | mkdir -p /sys |
| @@ -21,7 +38,8 @@ early_setup() { | |||
| 21 | 38 | ||
| 22 | mkdir -p /run | 39 | mkdir -p /run |
| 23 | mkdir -p /var/run | 40 | mkdir -p /var/run |
| 24 | /lib/udev/udevd --daemon | 41 | |
| 42 | $_UDEV_DAEMON --daemon | ||
| 25 | udevadm trigger --action=add | 43 | udevadm trigger --action=add |
| 26 | } | 44 | } |
| 27 | 45 | ||
