From 3d18550c52e536fba384f5d422f1cf27a1f159a0 Mon Sep 17 00:00:00 2001 From: Colin Guthrie <colin@mageia.org> Date: Sun, 22 Apr 2012 15:20:34 +0100 Subject: [PATCH 504/515] Parse and include the ide-controller and scsi_hostadapter definitions from /etc/modprobe.conf This is somewhat old but it's too late in the cycle to try and redefine this way of working. So just include the necessary modules and load them early. https://bugs.mageia.org/show_bug.cgi?id=4997 --- modules.d/90kernel-modules/module-setup.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/modules.d/90kernel-modules/module-setup.sh b/modules.d/90kernel-modules/module-setup.sh index 1ce133f..90b6ccf 100755 --- a/modules.d/90kernel-modules/module-setup.sh +++ b/modules.d/90kernel-modules/module-setup.sh @@ -75,6 +75,25 @@ installkernel() { hostonly='' instmods $i done fi + + # some hangovers from early mageia/mandriva setup days + modulefile=/etc/modprobe.conf + if [ -f $modulefile ]; then + scsimodules=$(grep -E '^[[:space:]]*(alias|probeall|install)[[:space:]]+scsi_hostadapter' $modulefile | sed 's/^.*scsi_hostadapter//;s/\/sbin\/modprobe//g;s/;//g;s/\/bin\/true//;s/||//') + + if [ -n "$scsimodules" ]; then + for m in $scsimodules; do + hostonly='' instmods $m && echo " rd.driver.pre=${m} " >> "${initdir}/etc/cmdline.d/90kernel-modules.conf" + done + fi + + idemodules=$(grep -E '^[[:space:]]*(alias|probeall|install)[[:space:]]+ide-controller[0-9]*[[:space:]]' $modulefile | sed 's/^.*ide-controller[0-9]*//;s/\/sbin\/modprobe//g;s/;//g;s/\/bin\/true//;s/||//') + if [ -n "$idemodules" ]; then + for m in $idemodules; do + hostonly='' instmods $m && echo " rd.driver.pre=${m} " >> "${initdir}/etc/cmdline.d/90kernel-modules.conf" + done + fi + fi fi : } -- 1.9.2