summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--functions8
1 files changed, 6 insertions, 2 deletions
diff --git a/functions b/functions
index 262a08a..14c6637 100644
--- a/functions
+++ b/functions
@@ -590,8 +590,12 @@ write_image_config() {
. "$CONFIG"
# sanitize of any extra whitespace
- read -r -a modules <<< "$MODULES"
- (( ${#modules[*]} )) && printf 'MODULES="%s"\n' "${modules[*]%\?}"
+ read -ra modules <<< "$MODULES"
+ for mod in "${modules[@]}"; do
+ in_array "${mod%\?}" "${ADDED_MODULES[@]}" || continue
+ add+=("${mod%\?}")
+ done
+ (( ${#add[*]} )) && printf 'MODULES="%s"\n' "${add[*]}"
printf '%s="%s"\n' \
'EARLYHOOKS' "${RUNHOOKS['early']# }" \