Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/guided.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-11-11 20:23:13 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-11-11 20:23:13 +0000
commit7288df57b7803fb6ca08ae40aa8a1d7ac683c7c4 (patch)
treef4c06fb1cec0475d5216a016005f374062e36938 /examples/guided.py
parentb3bcf54a2cb915b8dd9f59d6a85a5ea45f61fd96 (diff)
Fixed DNS logic, since DNS might become [""].
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 039296c8..ba1a5ac2 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -204,8 +204,11 @@ if nic:
fg='red'
)
- gateway = input('Enter your gateway (router) IP address or leave blank for none: ').strip()
- dns = input('Enter your DNS servers (space separated, blank for none): ').strip().split(' ')
+ if gateway = input('Enter your gateway (router) IP address or leave blank for none: ').strip()
+
+ dns = None
+ if len(dns := input('Enter your DNS servers (space separated, blank for none): ').strip()):
+ dns = dns.split(' ')
archinstall.storage['_guided']['network'] = {'nic': nic, 'dhcp': False, 'ip': ip, 'gateway' : gateway, 'dns' : dns}
else: