diff options
author | Roy Marples <roy@marples.name> | 2008-01-02 15:38:37 +0000 |
---|---|---|
committer | Roy Marples <roy@marples.name> | 2008-01-02 15:38:37 +0000 |
commit | fadee8e656807f466cdf39a9a9c0c113613bc36d (patch) | |
tree | 1179d0acb5e063621467654263e978274ec387dd /init.d.Linux/modules | |
parent | e5933843e81b213786f78bb267f84fa78f663b61 (diff) |
Move _shell_var shell function to shell_var C applet
Diffstat (limited to 'init.d.Linux/modules')
-rwxr-xr-x | init.d.Linux/modules | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/init.d.Linux/modules b/init.d.Linux/modules index 4a5c1257..c02510ed 100755 --- a/init.d.Linux/modules +++ b/init.d.Linux/modules @@ -30,21 +30,6 @@ depend() { use isapnp } -_shell_var() { - local rem=$1 c= r= var= - while [ -n "${rem}" ]; do - r=${rem#?} - c=${rem%${r}} - case "${c}" in - [a-zA-Z0-9]);; - *) c=_;; - esac - var=${var}${c} - rem=${r} - done - echo ${var} -} - start() { # Should not fail if kernel do not have module # support compiled in ... @@ -59,14 +44,14 @@ start() { local list= x= args= cnt=0 for x in "${KV}" ${KV_MAJOR}.${KV_MINOR}.${KV_MICRO} ${KV_MAJOR}.${KV_MINOR}; do - eval list=\$modules_$(_shell_var "${x}") + eval list=\$modules_$(shell_var "${x}") [ -n "${list}" ] && break done [ -z "${list}" ] && list=${modules} for x in ${list}; do ebegin "Loading module ${x}" - eval args=\$module_$(_shell_var "${x}")_args + eval args=\$module_$(shell_var "${x}")_args eval modprobe -q "${x}" "${args}" eend $? "Failed to load ${x}" && cnt=$((${cnt} + 1)) done |