5 if [[ -z $drivers ]]; then
6 block_module_filter
() {
7 local _blockfuncs
='ahci_platform_get_resources|ata_scsi_ioctl|scsi_add_host|blk_cleanup_queue|register_mtd_blktrans|scsi_esp_register|register_virtio_device|usb_stor_disconnect|mmc_add_host|sdhci_pltfm_init'
8 # subfunctions inherit following FDs
9 local _merge
=8 _side2
=9
12 while read _f
; do case "$_f" in
13 *.ko
) [[ $
(< $_f) =~
$_blockfuncs ]] && echo "$_f" ;;
14 *.ko.gz
) [[ $
(gzip -dc <$_f) =~
$_blockfuncs ]] && echo "$_f" ;;
15 *.ko.xz
) [[ $
(xz
-dc <$_f) =~
$_blockfuncs ]] && echo "$_f" ;;
25 echo "$_f2" 1>&${_side2}
27 done | bmf1
1>&${_merge}
30 # Use two parallel streams to filter alternating modules.
32 eval "( ( rotor ) ${_side2}>&1 | bmf1 ) ${_merge}>&1"
33 [[ $debug ]] && set -x
37 hostonly
='' instmods \
38 sr_mod sd_mod scsi_dh ata_piix hid_generic unix \
39 ehci-hcd ehci-pci ehci-platform \
44 instmods yenta_socket scsi_dh_rdac scsi_dh_emc \
45 atkbd i8042 usbhid hid-apple hid-sunplus hid-cherry hid-logitech \
46 hid-logitech-dj hid-microsoft hid-lcpower firewire-ohci \
47 pcmcia usb_storage nvme hid-hyperv hv-vmbus \
50 if [[ "$(uname -p)" == arm
* ]]; then
51 # arm specific modules
53 "=drivers/i2c/busses" \
54 "=drivers/regulator" \
61 # install virtual machine support
62 instmods virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
63 "=drivers/pcmcia" =ide
"=drivers/usb/storage"
65 find_kernel_modules | block_module_filter | instmods
67 # if not on hostonly mode, install all known filesystems,
68 # if the required list is not set via the filesystems variable
69 if ! [[ $hostonly ]]; then
70 if [[ -z $filesystems ]]; then
71 silent_omit_drivers
="kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd" \
75 for i
in $
(host_fs_all
); do
76 hostonly
='' instmods
$i
85 inst_multiple
-o /lib
/modprobe.d
/*.conf
86 [[ $hostonly ]] && inst_multiple
-H -o /etc
/modprobe.d
/*.conf
/etc
/modprobe.conf
87 if ! dracut_module_included
"systemd"; then
88 inst_hook cmdline
01 "$moddir/parse-kernel.sh"
90 inst_simple
"$moddir/insmodpost.sh" /sbin
/insmodpost.sh