summaryrefslogtreecommitdiffstats
path: root/external/poky/scripts/postinst-intercepts/update_udev_hwdb
diff options
context:
space:
mode:
authortakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
committertakeshi_hoshina <takeshi_hoshina@mail.toyota.co.jp>2020-11-02 11:07:33 +0900
commit1c7d6584a7811b7785ae5c1e378f14b5ba0971cf (patch)
treecd70a267a5ef105ba32f200aa088e281fbd85747 /external/poky/scripts/postinst-intercepts/update_udev_hwdb
parent4204309872da5cb401cbb2729d9e2d4869a87f42 (diff)
recipes
Diffstat (limited to 'external/poky/scripts/postinst-intercepts/update_udev_hwdb')
-rw-r--r--external/poky/scripts/postinst-intercepts/update_udev_hwdb19
1 files changed, 17 insertions, 2 deletions
diff --git a/external/poky/scripts/postinst-intercepts/update_udev_hwdb b/external/poky/scripts/postinst-intercepts/update_udev_hwdb
index b5cce0a0..102e99b9 100644
--- a/external/poky/scripts/postinst-intercepts/update_udev_hwdb
+++ b/external/poky/scripts/postinst-intercepts/update_udev_hwdb
@@ -1,6 +1,21 @@
#!/bin/sh
+#
+# SPDX-License-Identifier: MIT
+#
set -e
-PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D
-chown root:root $D${sysconfdir}/udev/hwdb.bin
+case "${PREFERRED_PROVIDER_udev}" in
+ systemd)
+ UDEV_EXTRA_ARGS="--usr"
+ UDEVLIBDIR="${rootlibexecdir}"
+ ;;
+
+ *)
+ UDEV_EXTRA_ARGS=""
+ UDEVLIBDIR="${sysconfdir}"
+ ;;
+esac
+
+PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${libexecdir}/${binprefix}udevadm hwdb --update --root $D ${UDEV_EXTRA_ARGS}
+chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin