Effective for genkernel's modprobe script or busybox "not small" modprobe. Signed-off-by: Dzianis Kahanovich <mahatma@eu.by> Updated-by: Richard Yao <ryao@cs.stonybrook.edu>
@ -39,6 +39,7 @@ FAKE_ROOT=''
REAL_ROOTFLAGS=''
ROOTFSTYPE='auto'
CRYPT_SILENT=0
mkdir -p /etc/cmdline /etc/modprobe.d
for x in ${CMDLINE}
do
case "${x}" in
@ -240,6 +241,23 @@ do
nounionfs)
USE_UNIONFS_NORMAL=0
;;
## for "module.param[=val]" we creating
## /etc/modprobe.d/module.param.conf: "options module param[=val]"
## /etc/cmdline/module.param:"param[=val]"
## first for CONFIG_MODPROBE_SMALL=n, next for script modprobe
*=*)
case "${x%%=*}" in
*.*)
y="${x%%[=/]*}"
echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/$y.conf"
echo "${x#*.}" >"/etc/cmdline/$y"
esac
echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/${x%%/*}.conf"
echo "${x#*.}" >"/etc/cmdline/${x%%/*}"
done
@ -110,7 +110,10 @@ modprobe2() {
filler=1
fi
${INSMOD} ${real_path} > /dev/null 2>&1
# placing options into x
x="${real_path##*/}"
x="`cat "/etc/cmdline/${x%.ko*}".* 2>/dev/null`"
${INSMOD} ${real_path} ${x} > /dev/null 2>&1
ret=$?
if [ ${ret} -eq 0 ]
then