From f613499bdf287d9ef4ab45bf0f1d6e22317a59af Mon Sep 17 00:00:00 2001 From: Colin Guthrie <colin@mageia.org> Date: Sun, 22 Apr 2012 15:20:34 +0100 Subject: [PATCH 505/511] 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 633a59d..5bf0863 100755 --- a/modules.d/90kernel-modules/module-setup.sh +++ b/modules.d/90kernel-modules/module-setup.sh @@ -65,6 +65,25 @@ installkernel() { } for_each_host_dev_fs inst_fs 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.8.1