Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorAnton Hvornum <anton@hvornum.se>2021-04-06 07:57:02 +0000
committerGitHub <noreply@github.com>2021-04-06 07:57:02 +0000
commit610d630863b949723431c230c4de8973dad8f60b (patch)
treed066f14065660c085d64d41e68e5029a3b06c0be /examples
parentdc522b74b92cac38446501b8bb4fefc006ffda32 (diff)
parent4af3bbac2306146ce038666f2911690c655bcb63 (diff)
Merge pull request #190 from advaithm/master
post install hook
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py15
1 files changed, 10 insertions, 5 deletions
diff --git a/examples/guided.py b/examples/guided.py
index e58228fd..81cc2991 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -1,4 +1,4 @@
-import getpass, time, json, sys, signal, os, subprocess
+import getpass, time, json, sys, signal, os
import archinstall
from archinstall.lib.hardware import hasUEFI
@@ -347,11 +347,16 @@ def perform_installation(device, boot_partition, language, mirrors):
if (root_pw := archinstall.arguments.get('!root-password', None)) and len(root_pw):
installation.user_set_pw('root', root_pw)
- if archinstall.arguments.get('profile', None) == "i3-wm" or archinstall.arguments.get('profile', None) == "i3-gaps":
- print("the installation of i3/i3-gaps does not conatain any configuerations for the wm. in this shell you should add your configuerations")
- subprocess.check_call("arch-chroot /mnt")
+ if archinstall.arguments['profile'] and archinstall.arguments['profile'].has_post_install():
+ with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py") as imported:
+ if not imported._post_install():
+ archinstall.log(
+ ' * Profile\'s post configuration requirements was not fulfilled.',
+ fg='red'
+ )
+ exit(1)
ask_user_questions()
perform_installation_steps()
- \ No newline at end of file
+