aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-core/systemd/systemd_216.bb18
1 files changed, 15 insertions, 3 deletions
diff --git a/meta/recipes-core/systemd/systemd_216.bb b/meta/recipes-core/systemd/systemd_216.bb
index ebf939574d..cd81818598 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -149,6 +149,10 @@ do_install() {
# Enable journal to forward message to syslog daemon
sed -i -e 's/.*ForwardToSyslog.*/ForwardToSyslog=yes/' ${D}${sysconfdir}/systemd/journald.conf
+
+ # Make systemd-udev-hwdb-update to check /etc/udev
+ cp ${D}${systemd_unitdir}/system/systemd-udev-hwdb-update.service ${D}${sysconfdir}/systemd/system
+ sed -i -e 's#ConditionNeedsUpdate=/etc#ConditionNeedsUpdate=/etc/udev#g' ${D}${sysconfdir}/systemd/system/systemd-udev-hwdb-update.service
}
do_install_ptest () {
@@ -355,10 +359,18 @@ ALTERNATIVE_PRIORITY[runlevel] ?= "300"
pkg_postinst_udev-hwdb () {
if test -n "$D"; then
- ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
- --root $D
+ if ${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
+ --root $D; then
+ touch $D/etc/udev/.updated
+ else
+ exit 1
+ fi
else
- udevadm hwdb --update
+ if udevadm hwdb --update; then
+ touch $D/etc/udev/.updated
+ else
+ exit 1
+ fi
fi
}