V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 53s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -55,20 +55,37 @@ yaml_validator() {
|
||||
declare var_auto_nic="" var_auto_ipv4="" var_auto_ipv4_ccidr="" var_auto_ipv4_subnet="" var_auto_ipv4_gw="" \
|
||||
var_auto_ipv6="" var_auto_ipv6_ccidr="" var_auto_ipv6_gw="" var_link_ipv4="" var_link_ipv6="" var_auto_fqdn=""
|
||||
declare -gx VAR_FINAL_NIC="" VAR_FINAL_FQDN="" VAR_FINAL_IPV4="" VAR_FINAL_IPV4_GW="" VAR_FINAL_IPV4_SUBNET="" \
|
||||
VAR_FINAL_IPV6="" VAR_LINK_IPV6=""
|
||||
VAR_FINAL_IPV6="" VAR_LINK_IPV6="" VAR_FINAL_IPV6_GW="" VAR_FINAL_IPV6_SUBNET=""
|
||||
|
||||
ARY_IPV4_NS+=("${network_static_ipv4nameserver_0}")
|
||||
ensure_lowercase "network_autoconfig_enable"
|
||||
ensure_lowercase "network_choose_interface_auto"
|
||||
ensure_lowercase "network_choose_interface_static"
|
||||
ensure_lowercase "network_hostname"
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv4nameserver_0 ]] && ARY_IPV4_NS+=( "${network_static_ipv4nameserver_0}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv4nameserver_1 ]] && ARY_IPV4_NS+=( "${network_static_ipv4nameserver_1}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv4nameserver_2 ]] && ARY_IPV4_NS+=( "${network_static_ipv4nameserver_2}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv4nameserver_3 ]] && ARY_IPV4_NS+=( "${network_static_ipv4nameserver_3}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv4nameserver_fallback_0 ]] && ARY_IPV4_NS+=( "${network_static_ipv4nameserver_fallback_0}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv4nameserver_fallback_1 ]] && ARY_IPV4_NS+=( "${network_static_ipv4nameserver_fallback_1}" )
|
||||
|
||||
ARY_IPV6_NS+=("${network_static_ipv6nameserver_0}")
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv6nameserver_0 ]] && ARY_IPV6_NS+=( "${network_static_ipv6nameserver_0}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv6nameserver_1 ]] && ARY_IPV6_NS+=( "${network_static_ipv6nameserver_1}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv6nameserver_2 ]] && ARY_IPV6_NS+=( "${network_static_ipv6nameserver_2}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv6nameserver_3 ]] && ARY_IPV6_NS+=( "${network_static_ipv6nameserver_3}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv6nameserver_fallback_0 ]] && ARY_IPV6_NS+=( "${network_static_ipv6nameserver_fallback_0}" )
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv6nameserver_fallback_1 ]] && ARY_IPV6_NS+=( "${network_static_ipv6nameserver_fallback_1}" )
|
||||
|
||||
### Check current network connection and configure variables
|
||||
@@ -129,7 +146,7 @@ yaml_validator() {
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto FQDN ='${var_auto_fqdn}'."
|
||||
|
||||
### Export hostname and IPv4 and IPv6 addresses for further processing according to dynamic results and preseed.yaml settings.
|
||||
if [[ "${network_autoconfig_enable,,}" == "true" ]]; then
|
||||
if [[ "${network_autoconfig_enable}" == "true" ]]; then
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_NIC="${var_auto_nic}"
|
||||
@@ -142,7 +159,7 @@ yaml_validator() {
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV4_SUBNET="${var_auto_ipv4_subnet}"
|
||||
|
||||
do_log "info" "file_only" "1252() Network IPv4 autoconfiguration: [${network_autoconfig_enable,,}]."
|
||||
do_log "info" "file_only" "1252() Network IPv4 autoconfiguration: [${network_autoconfig_enable}]."
|
||||
|
||||
else
|
||||
|
||||
@@ -157,25 +174,35 @@ yaml_validator() {
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV4_SUBNET="${network_static_ipv4netmask}"
|
||||
|
||||
do_log "info" "file_only" "1252() Network IPv4 autoconfiguration: [${network_autoconfig_enable,,}]."
|
||||
do_log "info" "file_only" "1252() Network IPv4 autoconfiguration: [${network_autoconfig_enable}]."
|
||||
|
||||
fi
|
||||
|
||||
if [[ "${network_autoconfig_enable,,}" == "true" && "${var_link_ipv6,,}" == "true" ]]; then
|
||||
if [[ "${network_autoconfig_enable}" == "true" && "${var_link_ipv6}" == "true" ]]; then
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV6="${var_auto_ipv6}"
|
||||
# shellcheck disable=SC2034
|
||||
VAR_LINK_IPV6="${var_link_ipv6}"
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV6_GW="${var_auto_ipv6_gw}"
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV6_SUBNET="${var_auto_ipv6_ccidr}"
|
||||
|
||||
do_log "info" "file_only" "1252() Network IPv6 autoconfiguration: [${network_autoconfig_enable,,}] and IPv6 Link: [${var_link_ipv6,,}]."
|
||||
do_log "info" "file_only" "1252() Network IPv6 autoconfiguration: [${network_autoconfig_enable}] and IPv6 Link: [${var_link_ipv6}]."
|
||||
|
||||
elif [[ "${network_autoconfig_enable,,}" == "false" && -n "${network_static_ipv6address}" ]]; then
|
||||
elif [[ "${network_autoconfig_enable}" == "false" && -n "${network_static_ipv6address}" ]]; then
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
VAR_LINK_IPV6="${var_link_ipv6}"
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV6="${network_static_ipv6address}"
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV6_GW="${network_static_ipv6gateway}"
|
||||
# shellcheck disable=SC2034
|
||||
VAR_FINAL_IPV6_SUBNET="${network_static_ipv6netmask}"
|
||||
|
||||
do_log "info" "file_only" "1252() Network IPv6 autoconfiguration: [${network_autoconfig_enable,,}] and IPv6 static: [${network_static_ipv6address}]."
|
||||
do_log "info" "file_only" "1252() Network IPv6 autoconfiguration: [${network_autoconfig_enable}] and IPv6 static: [${network_static_ipv6address}]."
|
||||
|
||||
else
|
||||
|
||||
|
||||
Reference in New Issue
Block a user