summaryrefslogtreecommitdiffstats
path: root/functions
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-01-23 18:13:02 +0100
committerAaron Griffin <aaronmgriffin@gmail.com>2009-01-23 18:13:02 +0100
commit3719079643a98af53ee3a69cb578f8c26b19f2b2 (patch)
tree5561d451b532234ef261ebe8d220f990f28ef5ab /functions
parent370ce8157185390d9a2be5d27f51d35a866d93d6 (diff)
downloadmkinitcpio-3719079643a98af53ee3a69cb578f8c26b19f2b2.tar.gz
mkinitcpio-3719079643a98af53ee3a69cb578f8c26b19f2b2.tar.xz
Fix a dash/underscore module name issue
This was introduced with the switch to resolve-modalias Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'functions')
-rw-r--r--functions7
1 files changed, 4 insertions, 3 deletions
diff --git a/functions b/functions
index 354a855..9c5f75b 100644
--- a/functions
+++ b/functions
@@ -8,7 +8,7 @@ auto_modules ()
[ -n "$m" ] && mods="$mods $m"
done
- echo "${mods}"
+ echo "${mods}" | sed 's|-|_|g'
[ -z "${mods}" ] && return 1
return 0
}
@@ -26,8 +26,9 @@ checked_modules ()
{
if [ -e "${MODULE_FILE}" ]; then
for mod in $(all_modules $@); do
- if grep "^$(basename ${mod%%\.ko})$" "${MODULE_FILE}" >/dev/null 2>&1; then
- echo ${mod}
+ modname="$(basename ${mod%%\.ko} | sed 's|-|_|g')"
+ if grep "^${modname}$" "${MODULE_FILE}" >/dev/null 2>&1; then
+ echo ${modname}
fi
done
return 1