blob: 102e99b94725ccb4ad778485281798b3560541bf [file] [log] [blame]
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08001#!/bin/sh
Brad Bishopc342db32019-05-15 21:57:59 -04002#
3# SPDX-License-Identifier: MIT
4#
Brad Bishop1a4b7ee2018-12-16 17:11:34 -08005
6set -e
7
Andrew Geissler82c905d2020-04-13 13:39:40 -05008case "${PREFERRED_PROVIDER_udev}" in
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