From 7debf540ca69d9171cb86b4752c882bac997c26e Mon Sep 17 00:00:00 2001 From: Antonio Alvarez Feijoo Date: Tue, 29 Nov 2022 17:02:03 +0100 Subject: [PATCH] feat(kernel-modules): exclude USB drivers in strict hostonly mode Provide a way to avoid installing all USB drivers in some use cases where they are not needed, i.e., machines without a USB bus. --- modules.d/90kernel-modules/module-setup.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh index eb478c7ee2..e00ed06e33 100755 --- a/modules.d/90kernel-modules/module-setup.sh +++ b/modules.d/90kernel-modules/module-setup.sh @@ -35,13 +35,14 @@ installkernel() { if [[ -z $drivers ]]; then hostonly='' instmods \ - hid_generic unix \ + hid_generic unix + + hostonly=$(optional_hostonly) instmods \ ehci-hcd ehci-pci ehci-platform \ ohci-hcd ohci-pci \ uhci-hcd \ - xhci-hcd xhci-pci xhci-plat-hcd - - hostonly=$(optional_hostonly) instmods \ + usbhid \ + xhci-hcd xhci-pci xhci-plat-hcd \ "=drivers/hid" \ "=drivers/tty/serial" \ "=drivers/input/serio" \ @@ -54,7 +55,7 @@ installkernel() { instmods \ yenta_socket \ - atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \ + atkbd i8042 firewire-ohci pcmcia hv-vmbus \ virtio virtio_ring virtio_pci pci_hyperv \ "=drivers/pcmcia"