V8.00.000.2025.06.17
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m31s
All checks were successful
🛡️ Shell Script Linting / 🛡️ Shell Script Linting (push) Successful in 1m31s
Signed-off-by: Marc S. Weidner <msw@coresecret.dev>
This commit is contained in:
@@ -24,9 +24,9 @@ guard_sourcing
|
||||
# VAR_FINAL_IPV6_CIDR
|
||||
# VAR_FINAL_IPV6_GW
|
||||
# VAR_FINAL_NIC
|
||||
# VAR_LINK_IPV6
|
||||
# network_autoconfig_enable
|
||||
# network_choose_interface_auto
|
||||
# network_static_dns_dhcp_override
|
||||
# network_static_ipv4nameserver_0
|
||||
# network_static_ipv6address
|
||||
# network_static_ipv6nameserver_0
|
||||
@@ -74,7 +74,7 @@ installation_network() {
|
||||
# For servers or systems with static interfaces that should always be available (e.g., eth0 on a server).
|
||||
# For configurations where the interface should be active regardless of the cable status.
|
||||
# allow-hotplug:
|
||||
# For systems with dynamic or removable network devices (e.g., laptops or USB adapters).
|
||||
# For systems with dynamic or removable network devices (e.g., laptops, USB adapters, VMs).
|
||||
# To avoid boot delays when interfaces are unavailable.
|
||||
|
||||
insert_header "${TARGET}/etc/network/interfaces"
|
||||
@@ -168,7 +168,7 @@ EOF
|
||||
insert_header "${TARGET}/etc/dhcpcd.conf"
|
||||
insert_comments "${TARGET}/etc/dhcpcd.conf"
|
||||
cat << 'EOF' >> "${TARGET}/etc/dhcpcd.conf"
|
||||
### No Global APIPA-Fallback
|
||||
### No Global APIPA-Fallback.
|
||||
noipv4ll
|
||||
|
||||
### A ServerID is required by RFC2131.
|
||||
@@ -182,6 +182,7 @@ option host_name
|
||||
option domain_name
|
||||
option domain_search
|
||||
option domain_name_servers
|
||||
option rapid_commit
|
||||
|
||||
### Most distributions have NTP support.
|
||||
option ntp_servers
|
||||
@@ -196,7 +197,7 @@ EOF
|
||||
[[ -n "${network_static_ipv4nameserver_0:-}" ]] && ary_dns_supersede+=( "${ARY_IPV4_NS[@]}" )
|
||||
[[ -n "${network_static_ipv6nameserver_0:-}" ]] && ary_dns_supersede+=( "${ARY_IPV6_NS[@]}" )
|
||||
|
||||
if [[ "${#ary_dns_supersede[@]}" -gt 0 ]]; then
|
||||
if [[ "${#ary_dns_supersede[@]}" -gt 0 && "${network_static_dns_dhcp_override}" == "true" ]]; then
|
||||
|
||||
cat << EOF >> "${TARGET}/etc/dhcpcd.conf"
|
||||
### Enforce static DNS
|
||||
|
||||
@@ -20,6 +20,7 @@ guard_sourcing
|
||||
# VAR_FINAL_FQDN
|
||||
# VAR_FINAL_IPV4
|
||||
# VAR_FINAL_IPV6
|
||||
# VAR_FINAL_NIC
|
||||
# VAR_SETUP_PATH
|
||||
# VAR_SSH_CA
|
||||
# VAR_SSH_PORT
|
||||
@@ -38,6 +39,16 @@ installation_ssh() {
|
||||
chroot_exec "${TARGET}" apt-get install -y --no-install-recommends --no-install-suggests ssh
|
||||
|
||||
mkdir -p "${TARGET}/etc/systemd/system/ssh.service.d"
|
||||
cat << EOF >> "${TARGET}/etc/systemd/system/ssh.service.d/override.conf"
|
||||
[Unit]
|
||||
Wants=ifup@${VAR_FINAL_NIC}.service network-online.target
|
||||
After=ifup@{VAR_FINAL_NIC}.service network-online.target
|
||||
|
||||
[Service]
|
||||
Restart=on-failure
|
||||
RestartSec=3s
|
||||
|
||||
EOF
|
||||
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/banner" "${TARGET}/etc/"
|
||||
install -D -m 0644 -o root -g root "${VAR_SETUP_PATH}/includes/target/etc/motd" "${TARGET}/etc/"
|
||||
|
||||
Reference in New Issue
Block a user