V8.00.000.2025.06.17
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -22,11 +22,14 @@ guard_sourcing
|
||||
# VAR_FINAL_IPV4_GW
|
||||
# VAR_FINAL_IPV4_SUBNET
|
||||
# VAR_FINAL_IPV6
|
||||
# VAR_FINAL_IPV6_CIDR
|
||||
# VAR_FINAL_IPV6_GW
|
||||
# VAR_FINAL_NIC
|
||||
# VAR_LINK_IPV6
|
||||
# network_autoconfig_enable
|
||||
# network_choose_interface_static
|
||||
# network_hostname
|
||||
# network_ipv6
|
||||
# network_static_ipv4address
|
||||
# network_static_ipv4gateway
|
||||
# network_static_ipv4nameserver_0
|
||||
@@ -37,12 +40,14 @@ guard_sourcing
|
||||
# network_static_ipv4nameserver_fallback_1
|
||||
# network_static_ipv4netmask
|
||||
# network_static_ipv6address
|
||||
# network_static_ipv6gateway
|
||||
# network_static_ipv6nameserver_0
|
||||
# network_static_ipv6nameserver_1
|
||||
# network_static_ipv6nameserver_2
|
||||
# network_static_ipv6nameserver_3
|
||||
# network_static_ipv6nameserver_fallback_0
|
||||
# network_static_ipv6nameserver_fallback_1
|
||||
# network_static_ipv6netmask
|
||||
# Arguments:
|
||||
# None
|
||||
# Returns:
|
||||
@@ -61,7 +66,6 @@ yaml_validator() {
|
||||
ensure_lowercase "network_choose_interface_auto"
|
||||
ensure_lowercase "network_choose_interface_static"
|
||||
ensure_lowercase "network_hostname"
|
||||
ensure_lowercase "network_static_enable"
|
||||
|
||||
# shellcheck disable=SC2034
|
||||
[[ -v network_static_ipv4nameserver_0 ]] && ARY_IPV4_NS+=( "${network_static_ipv4nameserver_0}" )
|
||||
@@ -131,17 +135,17 @@ yaml_validator() {
|
||||
var_auto_fqdn="${var_auto_fqdn%.}"
|
||||
var_auto_fqdn="${var_auto_fqdn,,}"
|
||||
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto NIC ='${var_auto_nic}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 ='${var_auto_ipv4}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 CCIDR ='${var_auto_ipv4_cidr}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 Subnet ='${var_auto_ipv4_subnet}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 Gateway ='${var_auto_ipv4_gw}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 ='${var_auto_ipv6}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 CCIDR ='${var_auto_ipv6_cidr}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 Gateway ='${var_auto_ipv6_gw}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 Link ='${var_link_ipv4}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 Link ='${var_link_ipv6}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto FQDN ='${var_auto_fqdn}'."
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto NIC = ${var_auto_nic}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 = ${var_auto_ipv4}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 CCIDR = ${var_auto_ipv4_cidr}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 Subnet = ${var_auto_ipv4_subnet}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 Gateway = ${var_auto_ipv4_gw}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 = ${var_auto_ipv6}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 CCIDR = ${var_auto_ipv6_cidr}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 Gateway = ${var_auto_ipv6_gw}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv4 Link = ${var_link_ipv4}"
|
||||
do_log "info" "file_only" "1252() Live environment network check: Auto IPv6 Link = ${var_link_ipv6}"
|
||||
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
|
||||
|
||||
@@ -153,7 +153,7 @@ EOF
|
||||
|
||||
|
||||
### Configure network interfaces based on 'preseed.yaml' and create network configuration files for IPv6.
|
||||
if [[ "${network_autoconfig_enable}" == "true" && "${VAR_LINK_IPV6}" == "true" && -z "${network_static_ipv6address}" ]]; then
|
||||
if [[ "${network_autoconfig_enable}" == "true" && -z "${network_static_ipv6address}" ]]; then
|
||||
|
||||
insert_header "${TARGET}/etc/network/interfaces.d/10-ipv6-dhcp"
|
||||
insert_comments "${TARGET}/etc/network/interfaces.d/10-ipv6-dhcp"
|
||||
@@ -168,7 +168,7 @@ EOF
|
||||
chmod 0644 "${TARGET}/etc/network/interfaces.d/10-ipv6-dhcp"
|
||||
do_log "info" "file_only" "4300() IPv6 on the primary NIC: '${VAR_FINAL_NIC}' configured with DHCP."
|
||||
|
||||
elif [[ "${VAR_LINK_IPV6}" == "true" && -n "${network_static_ipv6address}" ]]; then
|
||||
elif [[ "${network_autoconfig_enable}" == "false" || -n "${network_static_ipv6address}" ]]; then
|
||||
|
||||
insert_header "${TARGET}/etc/network/interfaces.d/10-ipv6-static"
|
||||
insert_comments "${TARGET}/etc/network/interfaces.d/10-ipv6-static"
|
||||
|
||||
Reference in New Issue
Block a user