Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall/lib/installer.py
diff options
context:
space:
mode:
authorDaniel Girtler <blackrabbit256@gmail.com>2023-07-17 17:27:21 +1000
committerGitHub <noreply@github.com>2023-07-17 09:27:21 +0200
commit2f273868d416c3309191db8c616aae683d78370a (patch)
tree9b38c0b631774d50b037bda3cef764e8cdf740d8 /archinstall/lib/installer.py
parentc67bb0b549b35ce335941c9c1cbe22f99c28f7fe (diff)
Fix network settings loading from config file (#1921)
* Fix network config error and simplify code * Update schema and exmaple --------- Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'archinstall/lib/installer.py')
-rw-r--r--archinstall/lib/installer.py18
1 files changed, 9 insertions, 9 deletions
diff --git a/archinstall/lib/installer.py b/archinstall/lib/installer.py
index 02d48768..8c5e7648 100644
--- a/archinstall/lib/installer.py
+++ b/archinstall/lib/installer.py
@@ -19,7 +19,7 @@ from .locale import verify_keyboard_layout, verify_x11_keyboard_layout
from .luks import Luks2
from .mirrors import use_mirrors, MirrorConfiguration, add_custom_mirrors
from .models.bootloader import Bootloader
-from .models.network_configuration import NetworkConfiguration
+from .models.network_configuration import Nic
from .models.users import User
from .output import log, error, info, warn, debug
from . import pacman
@@ -458,20 +458,20 @@ class Installer:
def drop_to_shell(self) -> None:
subprocess.check_call(f"/usr/bin/arch-chroot {self.target}", shell=True)
- def configure_nic(self, network_config: NetworkConfiguration) -> None:
- conf = network_config.as_systemd_config()
+ def configure_nic(self, nic: Nic):
+ conf = nic.as_systemd_config()
for plugin in plugins.values():
if hasattr(plugin, 'on_configure_nic'):
conf = plugin.on_configure_nic(
- network_config.iface,
- network_config.dhcp,
- network_config.ip,
- network_config.gateway,
- network_config.dns
+ nic.iface,
+ nic.dhcp,
+ nic.ip,
+ nic.gateway,
+ nic.dns
) or conf
- with open(f"{self.target}/etc/systemd/network/10-{network_config.iface}.network", "a") as netconf:
+ with open(f"{self.target}/etc/systemd/network/10-{nic.iface}.network", "a") as netconf:
netconf.write(str(conf))
def copy_iso_network_config(self, enable_services :bool = False) -> bool: