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>
REAL_ROOTFLAGS=''
ROOTFSTYPE='auto'
CRYPT_SILENT=0
+mkdir -p /etc/cmdline /etc/modprobe.d
for x in ${CMDLINE}
do
case "${x}" in
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%%/*}"
+ ;;
esac
done
filler=1
fi
done
- ${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