Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
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 /examples
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 'examples')
-rw-r--r--examples/config-sample.json20
-rw-r--r--examples/custom-command-sample.json4
-rw-r--r--examples/interactive_installation.py7
3 files changed, 18 insertions, 13 deletions
diff --git a/examples/config-sample.json b/examples/config-sample.json
index a7c5d537..38415b2c 100644
--- a/examples/config-sample.json
+++ b/examples/config-sample.json
@@ -99,13 +99,19 @@
"http://archlinux.mirror.digitalpacific.com.au/$repo/os/$arch": true,
}
},
- "nic": {
- "dhcp": true,
- "dns": null,
- "gateway": null,
- "iface": null,
- "ip": null,
- "type": "nm"
+ "network_config": {
+ "nics": [
+ {
+ "dhcp": false,
+ "dns": [
+ "3.3.3.3"
+ ],
+ "gateway": "2.2.2.2",
+ "iface": "enp0s31f6",
+ "ip": "1.1.1.1"
+ }
+ ],
+ "type": "manual"
},
"no_pkg_lookups": false,
"ntp": true,
diff --git a/examples/custom-command-sample.json b/examples/custom-command-sample.json
index 8d8d611d..b2250e2c 100644
--- a/examples/custom-command-sample.json
+++ b/examples/custom-command-sample.json
@@ -12,8 +12,8 @@
],
"keyboard-layout": "us",
"mirror-region": "Worldwide",
- "nic": {
- "type": "NM"
+ "network_config": {
+ "type": "nm"
},
"ntp": true,
"packages": ["docker", "git", "wget", "zsh"],
diff --git a/examples/interactive_installation.py b/examples/interactive_installation.py
index ce1a80ec..8e82ca7e 100644
--- a/examples/interactive_installation.py
+++ b/examples/interactive_installation.py
@@ -61,7 +61,7 @@ def ask_user_questions():
global_menu.enable('parallel downloads')
# Ask or Call the helper function that asks the user to optionally configure a network.
- global_menu.enable('nic')
+ global_menu.enable('network_config')
global_menu.enable('timezone')
@@ -137,11 +137,10 @@ def perform_installation(mountpoint: Path):
# If user selected to copy the current ISO network configuration
# Perform a copy of the config
- network_config = archinstall.arguments.get('nic', None)
+ network_config = archinstall.arguments.get('network_config', None)
if network_config:
- handler = models.NetworkConfigurationHandler(network_config)
- handler.config_installer(
+ network_config.install_network_config(
installation,
archinstall.arguments.get('profile_config', None)
)