Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 1 | #!/bin/sh |
Brad Bishop | c342db3 | 2019-05-15 21:57:59 -0400 | [diff] [blame] | 2 | # |
| 3 | # SPDX-License-Identifier: MIT |
| 4 | # |
Brad Bishop | 1a4b7ee | 2018-12-16 17:11:34 -0800 | [diff] [blame] | 5 | |
| 6 | set -e |
| 7 | |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 8 | case "${PREFERRED_PROVIDER_udev}" in |
| 9 | systemd) |
| 10 | UDEV_EXTRA_ARGS="--usr" |
| 11 | UDEVLIBDIR="${rootlibexecdir}" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 12 | UDEVADM="${base_bindir}/udevadm" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 13 | ;; |
| 14 | |
| 15 | *) |
| 16 | UDEV_EXTRA_ARGS="" |
| 17 | UDEVLIBDIR="${sysconfdir}" |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 18 | UDEVADM="${bindir}/udevadm" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 19 | ;; |
| 20 | esac |
| 21 | |
Andrew Geissler | 6ce62a2 | 2020-11-30 19:58:47 -0600 | [diff] [blame] | 22 | rm -f $D${UDEVLIBDIR}/udev/hwdb.bin |
Patrick Williams | 03907ee | 2022-05-01 06:28:52 -0500 | [diff] [blame] | 23 | PSEUDO_UNLOAD=1 ${binprefix}qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} || |
| 24 | PSEUDO_UNLOAD=1 qemuwrapper -L $D $D${UDEVADM} hwdb --update --root $D ${UDEV_EXTRA_ARGS} |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 25 | chown root:root $D${UDEVLIBDIR}/udev/hwdb.bin |