exclude virtual devices, dont harcode iface name instead match 'ether'

similar pattern to .network files shipped in /etc/systemd/network
This commit is contained in:
H4L0 2026-05-07 15:39:24 +02:00
parent 8be049859b
commit 1ae7504363
1 changed files with 1 additions and 1 deletions

View File

@ -65,7 +65,7 @@ def _configure_iwd_standalone(installation: Installer) -> None:
networkd_dir = installation.target / 'etc/systemd/network'
networkd_dir.mkdir(parents=True, exist_ok=True)
wired_conf = networkd_dir / '20-wired.network'
_ = wired_conf.write_text('[Match]\nName=en*\nName=eth*\n\n[Network]\nDHCP=yes\n')
_ = wired_conf.write_text('[Match]\nType=ether\nKind=!*\n\n[Network]\nDHCP=yes\n')
resolv = installation.target / 'etc/resolv.conf'
resolv.unlink(missing_ok=True)