diff options
author | Dave Reisner <dreisner@archlinux.org> | 2017-10-06 14:15:43 +0200 |
---|---|---|
committer | Dave Reisner <dreisner@archlinux.org> | 2017-10-06 21:18:06 +0200 |
commit | 5bba09cb1c661627fde76b977cfe9f937b1264a3 (patch) | |
tree | 2653ce5f7603f4389e32d95e33398d4a5aa2dda2 | |
parent | c99e8f6cc1e6f2aa08c667045c86608f86374a54 (diff) | |
download | mkinitcpio-5bba09cb1c661627fde76b977cfe9f937b1264a3.tar.gz mkinitcpio-5bba09cb1c661627fde76b977cfe9f937b1264a3.tar.xz |
Restore addition of modules from config file
Broken by c5ad00c2.
ref: https://bugs.archlinux.org/task/55870
-rw-r--r-- | functions | 11 |
1 files changed, 10 insertions, 1 deletions
@@ -627,9 +627,18 @@ parse_config() { map add_file "${FILES[@]}" tee "$BUILDROOT/buildconfig" < "$1" | { + # When MODULES is not an array (but instead implicitly converted at + # startup), sourcing the config causes the string value of MODULES + # to be assigned as MODULES[0]. Avoid this by explicitly unsetting + # MODULES before re-sourcing the config. + unset MODULES + . /dev/stdin - for mod in "${modules[@]%\?}"; do + # arrayize MODULES if necessary. + [[ ${MODULES@a} != *a* ]] && read -ra MODULES <<<"${MODULES//-/_}" + + for mod in "${MODULES[@]%\?}"; do mod=${mod//-/_} # only add real modules (2 == builtin) (( _addedmodules["$mod"] == 1 )) && add+=("$mod") |