Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorDylan Taylor <dylan@dylanmtaylor.com>2021-05-20 14:59:06 -0400
committerDylan Taylor <dylan@dylanmtaylor.com>2021-05-20 15:07:58 -0400
commit7811e01a9049d1c799bb9589807dd2cf3810eda8 (patch)
treeeedbef6f387d43cd5626a7580a3f036eeb75030f /examples
parentc39fc34eab0afd6b36802f97bb0df284f9308a48 (diff)
Switch back to arch-chroot
This reverts commit 27fa5119145ffdc50b7aff400315dc7a82a8cc29.
Diffstat (limited to 'examples')
-rw-r--r--examples/guided.py13
1 files changed, 6 insertions, 7 deletions
diff --git a/examples/guided.py b/examples/guided.py
index a2f2036e..1b7abab1 100644
--- a/examples/guided.py
+++ b/examples/guided.py
@@ -4,10 +4,10 @@ import os
import time
import archinstall
+from archinstall.lib.general import SysCommand
from archinstall.lib.hardware import has_uefi
from archinstall.lib.networking import check_mirror_reachable
from archinstall.lib.profiles import Profile
-from archinstall.lib.systemd import Boot
if archinstall.arguments.get('help'):
print("See `man archinstall` for help.")
@@ -379,12 +379,11 @@ def perform_installation(mountpoint):
# If the user provided custom commands to be run post-installation, execute them now.
if len(archinstall.arguments['custom-commands']):
- with Boot(installation) as session:
- for index, command in enumerate(archinstall.arguments['custom-commands']):
- archinstall.log(f'Executing custom command "{command}" ...', fg='yellow')
- with open(f"/mnt/var/tmp/user-command.{index}.sh", "w") as temp_script:
- temp_script.write(command)
- session.SysCommand(["bash", f"/var/tmp/user-command.{index}.sh"])
+ for index, command in enumerate(archinstall.arguments['custom-commands']):
+ archinstall.log(f'Executing custom command "{command}" ...', fg='yellow')
+ with open(f"/mnt/var/tmp/user-command.{index}.sh", "w") as temp_script:
+ temp_script.write(command)
+ SysCommand(f"arch-chroot /mnt bash /var/tmp/user-command.{index}.sh")
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'):