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:
Diffstat (limited to 'examples/guided.py')
-rw-r--r--examples/guided.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/examples/guided.py b/examples/guided.py
index 3a2bc1c0..d23c483e 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -4,6 +4,7 @@ import os
import time
import archinstall
+from archinstall.lib.general import run_custom_user_commands
from archinstall.lib.hardware import has_uefi
from archinstall.lib.networking import check_mirror_reachable
from archinstall.lib.profiles import Profile
@@ -186,10 +187,7 @@ def ask_user_questions():
if archinstall.arguments['profile'] and archinstall.arguments['profile'].has_prep_function():
with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py") as imported:
if not imported._prep_function():
- archinstall.log(
- ' * Profile\'s preparation requirements was not fulfilled.',
- fg='red'
- )
+ archinstall.log(' * Profile\'s preparation requirements was not fulfilled.', fg='red')
exit(1)
# Ask about audio server selection if one is not already set
@@ -381,6 +379,10 @@ def perform_installation(mountpoint):
archinstall.log(' * Profile\'s post configuration requirements was not fulfilled.', fg='red')
exit(1)
+ # If the user provided custom commands to be run post-installation, execute them now.
+ if archinstall.arguments.get('custom-commands', None):
+ run_custom_user_commands(archinstall.arguments['custom-commands'], installation)
+
installation.log("For post-installation tips, see https://wiki.archlinux.org/index.php/Installation_guide#Post-installation", fg="yellow")
if not archinstall.arguments.get('silent'):
choice = input("Would you like to chroot into the newly created installation and perform post-installation configuration? [Y/n] ")