Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDaniel <blackrabbit256@gmail.com>2022-04-22 21:24:12 +1000
committerGitHub <noreply@github.com>2022-04-22 13:24:12 +0200
commit477b5b120e120766d789a691fce60cec843aff43 (patch)
treed2580a7510c2c3ffff694d6145ee1b93c1fd6ea6 /examples
parent2529d6a5f59eb6a16f95bf9d1117a6033c527df9 (diff)
Support for multiple network interfaces (#1052)
* Support for multiple network interfaces * Fix mypy * Fix flake8 Co-authored-by: Daniel Girtler <girtler.daniel@gmail.com>
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py4
-rw-r--r--examples/swiss.py9
2 files changed, 10 insertions, 3 deletions
diff --git a/examples/guided.py b/examples/guided.py
index a677baa9..56e05ef9 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -4,6 +4,7 @@ import time
import archinstall
from archinstall import ConfigurationOutput
+from archinstall.lib.models.network_configuration import NetworkConfigurationHandler
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -167,7 +168,8 @@ def perform_installation(mountpoint):
network_config = archinstall.arguments.get('nic', None)
if network_config:
- network_config.config_installer(installation)
+ handler = NetworkConfigurationHandler(network_config)
+ handler.config_installer(installation)
if archinstall.arguments.get('audio', None) is not None:
installation.log(f"This audio server will be used: {archinstall.arguments.get('audio', None)}", level=logging.INFO)
diff --git a/examples/swiss.py b/examples/swiss.py
index b94ddcce..baf7b618 100644
--- a/examples/swiss.py
+++ b/examples/swiss.py
@@ -17,9 +17,13 @@ import logging
import os
import time
import pathlib
+from typing import TYPE_CHECKING, Any
import archinstall
-from archinstall import ConfigurationOutput
+from archinstall import ConfigurationOutput, NetworkConfigurationHandler
+
+if TYPE_CHECKING:
+ _: Any
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -397,7 +401,8 @@ def os_setup(installation):
network_config = archinstall.arguments.get('nic', None)
if network_config:
- network_config.config_installer(installation)
+ handler = NetworkConfigurationHandler(network_config)
+ handler.config_installer(installation)
if archinstall.arguments.get('audio', None) is not None:
installation.log(f"This audio server will be used: {archinstall.arguments.get('audio', None)}",level=logging.INFO)