diff options
author | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-01-23 18:13:02 +0100 |
---|---|---|
committer | Aaron Griffin <aaronmgriffin@gmail.com> | 2009-01-23 18:13:02 +0100 |
commit | 3719079643a98af53ee3a69cb578f8c26b19f2b2 (patch) | |
tree | 5561d451b532234ef261ebe8d220f990f28ef5ab /functions | |
parent | 370ce8157185390d9a2be5d27f51d35a866d93d6 (diff) | |
download | mkinitcpio-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-- | functions | 7 |
1 files changed, 4 insertions, 3 deletions
@@ -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 |