Skip to content

Commit

Permalink
feat(hwdb): add hwdb module to install hwdb.bin on demand
Browse files Browse the repository at this point in the history
Module to install hwdb.bin. Further extensions might make only selected
part of hwdb installable to save space. The module is not included by default.

Including the module adds 2MB of compressed data (on Fedora, the file has 12MB).

Installing hwdb.bin is needed in case of custom HW like a keyboard/mouse, or various interfaces.

Original PR: dracutdevs/dracut#1681
  • Loading branch information
pvalena committed Oct 27, 2024
1 parent fc96864 commit f071979
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
1 change: 1 addition & 0 deletions .distro/dracut.spec
Original file line number Diff line number Diff line change
Expand Up @@ -319,6 +319,7 @@ echo 'dracut_rescue_image="yes"' > $RPM_BUILD_ROOT%{dracutlibdir}/dracut.conf.d/
%{dracutlibdir}/modules.d/91tpm2-tss
%{dracutlibdir}/modules.d/95debug
%{dracutlibdir}/modules.d/95fstab-sys
%{dracutlibdir}/modules.d/95hwdb
%{dracutlibdir}/modules.d/95lunmask
%{dracutlibdir}/modules.d/95resume
%{dracutlibdir}/modules.d/95rootfs-block
Expand Down
7 changes: 5 additions & 2 deletions modules.d/95hwdb/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,18 @@
# This file is part of dracut.
# SPDX-License-Identifier: GPL-2.0-or-later

check() {
return 255
}

# called by dracut
install() {
inst_multiple -o \
/etc/udev/udev.hwdb \
"${udevdir}"/hwdb.bin

# Install the hosts local user configurations if enabled.
if [[ $hostonly ]]; then
inst_multiple -H -o \
"$udevconfdir"/hwdb.bin
"${udevconfdir}"/hwdb.bin
fi
}

0 comments on commit f071979

Please sign in to comment.