aboutsummaryrefslogtreecommitdiff
path: root/init.d.Linux
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-03-25 08:31:48 +0000
committerRoy Marples <roy@marples.name>2008-03-25 08:31:48 +0000
commit08aff6ef44ac5dc438d916b53aa61385f6d299f3 (patch)
tree508494a773b42575949a85e5b4c37bc3320cdd7d /init.d.Linux
parent0347f01345459a506d606002e6a0da29d8bcb77a (diff)
Allow per kernel version module arguments.
Diffstat (limited to 'init.d.Linux')
-rw-r--r--init.d.Linux/modules.in13
1 files changed, 11 insertions, 2 deletions
diff --git a/init.d.Linux/modules.in b/init.d.Linux/modules.in
index b09620df..1a0c7458 100644
--- a/init.d.Linux/modules.in
+++ b/init.d.Linux/modules.in
@@ -23,7 +23,7 @@ start()
x=${KV#*.*.}
local KV_MICRO=${x%%-*}
- local list= x= args= cnt=0
+ local list= x= xx= y= args= cnt=0
for x in "${KV}" \
${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} \
${KV_MAJOR}.${KV_MINOR} \
@@ -35,7 +35,16 @@ start()
for x in ${list}; do
ebegin "Loading module ${x}"
- eval args=\$module_$(shell_var "${x}")_args
+ xx=$(shell_var "${x}")
+ for y in "${KV}" \
+ ${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} \
+ ${KV_MAJOR}.${KV_MINOR} \
+ ; do
+ eval args=\$module_${xx}_args_$(shell_var "${y}")
+ [ -n "${args}" ] && break
+ done
+ done
+ [ -z "${args}" ] && eval args=\$module_${xx}_args
eval modprobe -q "${x}" "${args}"
eend $? "Failed to load ${x}" && cnt=$((${cnt} + 1))
done