summaryrefslogtreecommitdiffstats
path: root/scripts/postinst-intercepts/update_udev_hwdb
diff options
context:
space:
mode:
authorAlex Kiernan <alex.kiernan@gmail.com>2020-03-27 17:25:11 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2020-03-31 13:58:01 +0100
commite3037b54ea348685f06edf1bded6ae2f7d53a903 (patch)
tree60ad29aecdad106e650679b2ea7214862391b328 /scripts/postinst-intercepts/update_udev_hwdb
parent06a02da2d28e7a27441f0222b7330f7232f7ac88 (diff)
downloadpoky-e3037b54ea348685f06edf1bded6ae2f7d53a903.tar.gz
systemd: Reinstate systemd-hwdb-update.service
systemd supports a distribution hwdb.bin in /usr/lib/udev/hwdb.bin, which is used if /etc/udev/hwdb.bin is not present. When generating the install time hwdb, for systemd, ensure that we put it in /usr/lib/udev, which then ensures that at boot time we do not regenerate it, unless the system is marked for update. This allows fragments dropped into /etc/udev/hwdb.d to be processed correctly, but without requiring a first boot time build: root@qemumips:~# systemctl status systemd-hwdb-update.service * systemd-hwdb-update.service - Rebuild Hardware Database Loaded: loaded (/usr/lib/systemd/system/systemd-hwdb-update.service; static; vendor preset: disabled) Active: inactive (dead) Condition: start condition failed at Wed 2020-03-04 15:18:11 UTC; 44s ago |- ConditionPathExists=|!/usr/lib/udev/hwdb.bin was not met |- ConditionPathExists=|/etc/udev/hwdb.bin was not met `- ConditionDirectoryNotEmpty=|/etc/udev/hwdb.d was not met Docs: man:hwdb(7) man:systemd-hwdb(8) (From OE-Core rev: 78ff610e571e4d739326520c391a37ee1f1290ae) Signed-off-by: Alex Kiernan <alex.kiernan@gmail.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'scripts/postinst-intercepts/update_udev_hwdb')
-rw-r--r--scripts/postinst-intercepts/update_udev_hwdb16
1 files changed, 14 insertions, 2 deletions
diff --git a/scripts/postinst-intercepts/update_udev_hwdb b/scripts/postinst-intercepts/update_udev_hwdb
index c4fb2bffcb..102e99b947 100644
--- a/scripts/postinst-intercepts/update_udev_hwdb
+++ b/scripts/postinst-intercepts/update_udev_hwdb
@@ -5,5 +5,17 @@
5 5
6set -e 6set -e
7 7
8PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D 8case "${PREFERRED_PROVIDER_udev}" in
9chown root:root $D${sysconfdir}/udev/hwdb.bin 9 systemd)
10 UDEV_EXTRA_ARGS="--usr"
11 UDEVLIBDIR="${rootlibexecdir}"
12 ;;
13
14 *)
15 UDEV_EXTRA_ARGS=""
16 UDEVLIBDIR="${sysconfdir}"
17 ;;
18esac
19
20PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS}
21chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin