]> Kevux Git Server - fll/commitdiff
Bugfix: The bootstrap script is overwriting existing multi-valued settings.
authorKevin Day <Kevin@kevux.org>
Wed, 22 Apr 2026 03:47:00 +0000 (22:47 -0500)
committerKevin Day <Kevin@kevux.org>
Wed, 22 Apr 2026 03:47:00 +0000 (22:47 -0500)
This happens when there are multiple modes specifying the same value.
The multi-valued settings must have the value appended and not overwritten or removed.

Specifically, the setting is designated as not populated when a mode specifies a setting and then is followed by another mode that does not specify this setting.

Resolve this by adding checks if the setting is already designated as specified.
If the settings is not specified, then and only then declare it as unspecified.

build/scripts/bootstrap.sh

index d52e07daf0865216fdf55474368fe181c5f657f1..101a8d7c750e18f9b7d857c1836619db1b6cbf8a 100644 (file)
@@ -775,7 +775,9 @@ bootstrap_load_settings_mode() {
 
         bootstrap_id "has-${i}-mode"
         if [[ ${key} -ne 0 ]] ; then
-          variables[${key}]="no"
+          if [[ ${variables[${key}]} != "yes" ]] ; then
+            variables[${key}]="no"
+          fi
         fi
       else
         if [[ $(grep -sho "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
@@ -796,7 +798,9 @@ bootstrap_load_settings_mode() {
         else
           bootstrap_id "has-${i}-mode"
           if [[ ${key} -ne 0 ]] ; then
-            variables[${key}]="no"
+            if [[ ${variables[${key}]} != "yes" ]] ; then
+              variables[${key}]="no"
+            fi
           fi
         fi
       fi
@@ -814,7 +818,9 @@ bootstrap_load_settings_mode() {
 
         bootstrap_id "has-${i}-mode"
         if [[ ${key} -ne 0 ]] ; then
-          variables[${key}]="no"
+          if [[ ${variables[${key}]} != "yes" ]] ; then
+            variables[${key}]="no"
+          fi
         fi
       else
         if [[ $(grep -sho "^[[:space:]]*${i}-${m}[[:space:]].*\$" ${settings_file}) != "" ]] ; then
@@ -835,7 +841,9 @@ bootstrap_load_settings_mode() {
         else
           bootstrap_id "has-${i}-mode"
           if [[ ${key} -ne 0 ]] ; then
-            variables[${key}]="no"
+            if [[ ${variables[${key}]} != "yes" ]] ; then
+              variables[${key}]="no"
+            fi
           fi
         fi
       fi