V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 54s

Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
2025-08-05 20:32:52 +02:00
parent c90e7f0deb
commit 053a06d7e1
29 changed files with 276 additions and 184 deletions

View File

@@ -62,16 +62,31 @@ yaml_parser() {
fi
done < <(compgen -v)
### Delete the respective 'key:value'-variables in the global variable set.
sed -i '/^grub_parameter_[0-9]\+=/d' "${VAR_PRESEED}"
sed -i '/^locale_locale_[0-9]\+=/d' "${VAR_PRESEED}"
sed -i '/^ntp_server_[0-9]\+=/d' "${VAR_PRESEED}"
sed -i '/^software_[0-9]\+=/d' "${VAR_PRESEED}"
### Remove obsolete variables, normalize empty assignments, wrap remaining values in single quotes
sed -i -E '
# --- Deletions --------------------------------------------------------
/^grub_parameter_[0-9]+=/d # delete grub parameter variables
/^locale_locale_[0-9]+=/d # delete locale variables
/^ntp_server_[0-9]+=/d # delete NTP server variables
/^software_[0-9]+=/d # delete software list variables
### Substitute all key= by key=""
sed -i -E 's/^(.*)=\s*$/\1=""/' "${VAR_PRESEED}"
### Wrap each key=value by '' e.g., key='value'
sed -i -E "s/^(.*)=([^'\"]+)$/\1='\2'/" "${VAR_PRESEED}"
# --- Empty-value normalisation ---------------------------------------
s/^(.*)=\s*$/\1=""/ # turn key= into key=""
# --- Quote unquoted values -------------------------------------------
s/^(.*)=([^'\''"]+)/\1='\''\2'\''/ # wrap value in single quotes
' "${VAR_PRESEED}"
# ### Delete the respective 'key:value'-variables in the global variable set.
# sed -i '/^grub_parameter_[0-9]\+=/d' "${VAR_PRESEED}"
# sed -i '/^locale_locale_[0-9]\+=/d' "${VAR_PRESEED}"
# sed -i '/^ntp_server_[0-9]\+=/d' "${VAR_PRESEED}"
# sed -i '/^software_[0-9]\+=/d' "${VAR_PRESEED}"
# ### Substitute all key= by key=""
# sed -i -E 's/^(.*)=\s*$/\1=""/' "${VAR_PRESEED}"
# ### Wrap each key=value by '' e.g., key='value'
# sed -i -E "s/^(.*)=([^'\"]+)$/\1='\2'/" "${VAR_PRESEED}"
# shellcheck disable=SC1090
. "${VAR_PRESEED}"

View File

@@ -164,7 +164,7 @@ END { print max }
elif [[ "${VAR_RECIPE_TABLE,,}" == "msdos" && "${VAR_RECIPE_FIRMWARE,,}" == "uefi" ]]; then
do_log "info" "file_only" "1251() Partition table: '${VAR_RECIPE_TABLE}' and firmware: '${VAR_RECIPE_FIRMWARE}' > ESP on MBR needs partition type '0xEF'."
do_log "warn" "file_only" "1251() Partition table: '${VAR_RECIPE_TABLE}' and firmware: '${VAR_RECIPE_FIRMWARE}' > ESP on MBR needs partition type '0xEF'."
elif [[ "${VAR_RECIPE_TABLE,,}" == "msdos" && "${VAR_RECIPE_FIRMWARE,,}" == "bios" ]]; then