Really, really, this time for sure, fix the network stack (#523)

This commit is contained in:
Itxaka 2023-10-25 11:24:39 +02:00 committed by GitHub
parent 362058eda5
commit 93f1b62c6f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 36 additions and 4 deletions

View File

@ -1,4 +1,4 @@
packages:
- name: "kairos-overlay-files"
category: "static"
version: "1.1.10"
version: "1.1.11"

View File

@ -1,6 +1,6 @@
name: "Default network configuration"
stages:
rootfs:
rootfs.before:
- name: "Enable systemd-network config files for DHCP" # Needed if systemd-networkd runs in the initramfs!
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]'
directories:
@ -15,9 +15,20 @@ stages:
group: 0
content: |
[Match]
Name=en* eth*
Name=en*
[Network]
DHCP=yes
- path: /etc/systemd/network/20-dhcp-legacy.network
permissions: 0644
owner: 0
group: 0
content: |
[Match]
Name=eth*
[Network]
DHCP=yes
commands:
- networkctl reload # make sure it reloads our config files
initramfs:
- name: "Enable systemd-network config files for DHCP"
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]'
@ -28,9 +39,20 @@ stages:
group: 0
content: |
[Match]
Name=en* eth*
Name=en*
[Network]
DHCP=yes
- path: /etc/systemd/network/20-dhcp-legacy.network
permissions: 0644
owner: 0
group: 0
content: |
[Match]
Name=eth*
[Network]
DHCP=yes
commands:
- networkctl reload # make sure it reloads our config files
- name: "Disable NetworkManager and wicked"
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]'
systemctl:
@ -48,6 +70,16 @@ stages:
commands:
- rm /etc/resolv.conf
- ln -s /run/systemd/resolve/resolv.conf /etc/resolv.conf
boot:
- name: "Reload systemd-networkd config"
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]'
commands:
- networkctl reload # make sure it reloads our config files
fs:
- name: "Reload systemd-networkd config"
if: '[ -e "/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ] || [ -e "/usr/sbin/systemctl" ] || [ -e "/usr/bin/systemctl" ]'
commands:
- networkctl reload # make sure it reloads our config files
# dns:
# path: /etc/resolv.conf
# nameservers: