From 908a463e07491d3c69aa1daf853b4d699dbb8534 Mon Sep 17 00:00:00 2001 From: Richard Yao Date: Thu, 19 Jul 2012 15:59:03 -0400 Subject: Support module options set in /etc/module.d, amend cmdline options patch --- defaults/linuxrc | 12 +----------- defaults/modprobe | 2 +- 2 files changed, 2 insertions(+), 12 deletions(-) (limited to 'defaults') diff --git a/defaults/linuxrc b/defaults/linuxrc index 91a3396b..90099c85 100755 --- a/defaults/linuxrc +++ b/defaults/linuxrc @@ -241,23 +241,13 @@ 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" + echo "${x#*.}" >> "/etc/module_options/${x%%.*}.conf" ;; esac ;; - *.*) - echo "options ${x%%.*} ${x#*.}" >"/etc/modprobe.d/${x%%/*}.conf" - echo "${x#*.}" >"/etc/cmdline/${x%%/*}" - ;; esac done diff --git a/defaults/modprobe b/defaults/modprobe index 1f606bd2..6bbe7e41 100755 --- a/defaults/modprobe +++ b/defaults/modprobe @@ -112,7 +112,7 @@ modprobe2() { done # placing options into x x="${real_path##*/}" - x="`cat "/etc/cmdline/${x%.ko*}".* 2>/dev/null`" + x="`cat "/etc/module_options/${x%.ko*}".* 2>/dev/null`" ${INSMOD} ${real_path} ${x} > /dev/null 2>&1 ret=$? if [ ${ret} -eq 0 ] -- cgit v1.2.3-65-gdbad