diff options
author | Mike Pagano <mpagano@gentoo.org> | 2023-01-11 09:07:55 -0500 |
---|---|---|
committer | Mike Pagano <mpagano@gentoo.org> | 2023-01-11 09:07:55 -0500 |
commit | 2bd0e2bb9236fe31224a6d8984ce85a38add6849 (patch) | |
tree | 852be7c20d65ca98e8ba4cf61e5403e9b3893e64 /eclass | |
parent | dev-libs/confuse: crank copyright (diff) | |
download | gentoo-2bd0e2bb9236fe31224a6d8984ce85a38add6849.tar.gz gentoo-2bd0e2bb9236fe31224a6d8984ce85a38add6849.tar.bz2 gentoo-2bd0e2bb9236fe31224a6d8984ce85a38add6849.zip |
linux-mod.eclass: Fix MODULESD_* for hyphenated modules
Use of the MODULESD_<modulename>_{ADDITIONS,ALIASES,EXAMPLES} variables do not
currently work with external modules that are hyphenated. The current behavior
results in an invalid modprobe.d file containing partially evaluated content.
This appears to be due to use of ${currm} rather than ${currm_t} when
Referencing variables. This changes the use of ${currm} to ${currm_t} when
referencing variables to resolve this issue.
Closes: https://bugs.gentoo.org/889752
Author: Steven Stallion <steven.stallion@sony.com>
Signed-off-by: Mike Pagano <mpagano@gentoo.org>
Diffstat (limited to 'eclass')
-rw-r--r-- | eclass/linux-mod.eclass | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/eclass/linux-mod.eclass b/eclass/linux-mod.eclass index d14bbf7d9eae..6cf9969b19af 100644 --- a/eclass/linux-mod.eclass +++ b/eclass/linux-mod.eclass @@ -408,7 +408,7 @@ generate_modulesd() { for((t=0; t<${module_aliases}; t++)) do - echo "alias $(eval echo \${MODULESD_${currm}_ALIASES[$t]})" \ + echo "alias $(eval echo \${MODULESD_${currm_t}_ALIASES[$t]})" \ >> "${module_config}" done echo '' >> "${module_config}" @@ -434,7 +434,7 @@ generate_modulesd() { fi #----------------------------------------------------------------------- - if [[ $(eval echo \${MODULESD_${currm}_ALIASES[0]}) == guess ]]; then + if [[ $(eval echo \${MODULESD_${currm_t}_ALIASES[0]}) == guess ]]; then # So, let's do some guesswork, eh? if [[ -n ${module_opts} ]]; then echo "# For Example..." >> "${module_config}" @@ -449,7 +449,7 @@ generate_modulesd() { echo "# For Example..." >> "${module_config}" echo "# --------------" >> "${module_config}" for ((t=0; t<${module_examples}; t++)); do - echo "options $(eval echo \${MODULESD_${currm}_EXAMPLES[$t]})" \ + echo "options $(eval echo \${MODULESD_${currm_t}_EXAMPLES[$t]})" \ >> "${module_config}" done echo '' >> "${module_config}" @@ -458,7 +458,7 @@ generate_modulesd() { #----------------------------------------------------------------------- if [[ ${module_additions} -gt 0 ]]; then for ((t=0; t<${module_additions}; t++)); do - echo "$(eval echo \${MODULESD_${currm}_ADDITIONS[$t]})" \ + echo "$(eval echo \${MODULESD_${currm_t}_ADDITIONS[$t]})" \ >> "${module_config}" done echo '' >> "${module_config}" |