summaryrefslogtreecommitdiff
path: root/init.d.Linux
diff options
context:
space:
mode:
authorRoy Marples <roy@marples.name>2008-01-02 15:38:37 +0000
committerRoy Marples <roy@marples.name>2008-01-02 15:38:37 +0000
commitfadee8e656807f466cdf39a9a9c0c113613bc36d (patch)
tree1179d0acb5e063621467654263e978274ec387dd /init.d.Linux
parente5933843e81b213786f78bb267f84fa78f663b61 (diff)
downloadopenrc-fadee8e656807f466cdf39a9a9c0c113613bc36d.tar.gz
openrc-fadee8e656807f466cdf39a9a9c0c113613bc36d.tar.bz2
openrc-fadee8e656807f466cdf39a9a9c0c113613bc36d.tar.xz
Move _shell_var shell function to shell_var C applet
Diffstat (limited to 'init.d.Linux')
-rwxr-xr-xinit.d.Linux/modules19
1 files changed, 2 insertions, 17 deletions
diff --git a/init.d.Linux/modules b/init.d.Linux/modules
index 4a5c125..c02510e 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