Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/minimal.py2
-rw-r--r--examples/unattended.py19
2 files changed, 16 insertions, 5 deletions
diff --git a/examples/minimal.py b/examples/minimal.py
index 203fa94e..c0ccfe20 100644
--- a/examples/minimal.py
+++ b/examples/minimal.py
@@ -24,7 +24,7 @@ with archinstall.Filesystem(harddrive, archinstall.GPT) as fs:
installation.add_bootloader()
installation.add_additional_packages(['nano', 'wget', 'git'])
- installation.install_profile('workstation')
+ installation.install_profile('awesome')
installation.user_create('anton', 'test')
installation.user_set_pw('root', 'toor')
diff --git a/examples/unattended.py b/examples/unattended.py
index 7dfa58c1..b0ef0b7b 100644
--- a/examples/unattended.py
+++ b/examples/unattended.py
@@ -1,6 +1,17 @@
import archinstall
+import time
-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
+for name, info in archinstall.list_profiles().items():
+ # Tailored means it's a match for this machine
+ # based on it's MAC address (or some other criteria
+ # that fits the requirements for this machine specifically).
+ if info['tailored']:
+ print(f'Found a tailored profile for this machine called: "{name}".')
+ print(f'Starting install in:')
+ for i in range(10, 0, -1):
+ print(f'{i}...')
+ time.sleep(1)
+
+ profile = archinstall.Profile(None, info['path'])
+ profile.install()
+ break \ No newline at end of file