Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples/unattended.py
diff options
context:
space:
mode:
authorAnton Hvornum <anton.feeds+github@gmail.com>2020-08-20 17:08:13 +0000
committerAnton Hvornum <anton.feeds+github@gmail.com>2020-08-20 17:08:13 +0000
commit056b800c8eb42c4112dce54bd1a7336d52ead2ab (patch)
treef26df1541224fd11a1d485ff6c463979d7c01983 /examples/unattended.py
parentaaad480ab845ad644fdb8455d2bbf1763c605d24 (diff)
Starting to add networking helpers in archinstall. First up is archinstall.getHwAddr(ifname) which returns the mac of a interface name. second is archinstall.list_interfaces() which lists all the local MAC addresses and which interface it is bound to. Also starting to add the unattended installer back step by step. Currently with one MAC profile. The MAC profile filtering/detection has also been added in archinstall.list_profiles() - it will filter out all MAC address-specific profiles when called, unless a MAC matches a profile or filter_irrelevant_macs=False is given.
Diffstat (limited to 'examples/unattended.py')
-rw-r--r--examples/unattended.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/examples/unattended.py b/examples/unattended.py
new file mode 100644
index 00000000..7dfa58c1
--- /dev/null
+++ b/examples/unattended.py
@@ -0,0 +1,6 @@
+import archinstall
+
+for profile in archinstall.list_profiles():
+ # Tailored means it's a match for this machine.
+ if profile['tailored']:
+ print('Selecting profile to be installed:', profile) \ No newline at end of file