5 find_kernel_modules_external
() {
7 local external_pattern
="^/"
9 [[ -f "$srcmods/modules.dep" ]] ||
return 0
14 [[ $a =~
$external_pattern ]] ||
continue
16 done < "$srcmods/modules.dep"
19 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_add_host|scsi_add_host_with_dma'
21 if [[ -z $drivers ]]; then
22 hostonly
='' instmods \
23 sr_mod sd_mod scsi_dh ata_piix hid_generic unix \
24 ehci-hcd ehci-pci ehci-platform \
27 xhci-hcd xhci-pci xhci-plat-hcd \
31 hostonly
=$
(optional_hostonly
) instmods \
33 "=drivers/tty/serial" \
34 "=drivers/input/serio" \
35 "=drivers/input/keyboard" \
36 "=drivers/usb/storage" \
41 yenta_socket scsi_dh_rdac scsi_dh_emc scsi_dh_alua \
42 atkbd i8042 usbhid firewire-ohci pcmcia hv-vmbus \
43 virtio virtio_blk virtio_ring virtio_pci virtio_scsi \
44 "=drivers/pcmcia" =ide nvme vmd nfit
46 if [[ "$(uname -m)" == arm
* ||
"$(uname -m)" == aarch64
]]; then
47 # arm/aarch64 specific modules
48 _blockfuncs
+='|dw_mc_probe|dw_mci_pltfm_register'
54 "=drivers/hwspinlock" \
55 "=drivers/i2c/busses" \
60 "=drivers/regulator" \
64 "=drivers/usb/chipidea" \
71 "=drivers/scsi/hisi_sas" \
75 dracut_instmods
-o -s "${_blockfuncs}" "=drivers"
77 find_kernel_modules_external | instmods
79 # if not on hostonly mode, install all known filesystems,
80 # if the required list is not set via the filesystems variable
81 if ! [[ $hostonly ]]; then
82 if [[ -z $filesystems ]]; then
83 dracut_instmods
-o -P ".*/(kernel/fs/nfs|kernel/fs/nfsd|kernel/fs/lockd)/.*" '=fs'
85 elif [[ "${host_fs_types[*]}" ]]; then
86 hostonly
='' instmods
"${host_fs_types[@]}"
94 inst_multiple
-o /lib
/modprobe.d
/*.conf
95 [[ $hostonly ]] && inst_multiple
-H -o /etc
/modprobe.d
/*.conf
/etc
/modprobe.conf
96 if ! dracut_module_included
"systemd"; then
97 inst_hook cmdline
01 "$moddir/parse-kernel.sh"
99 inst_simple
"$moddir/insmodpost.sh" /sbin
/insmodpost.sh