Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/archinstall
diff options
context:
space:
mode:
authorDylan Taylor <dylan@dylanmtaylor.com>2021-05-20 17:55:40 -0400
committerDylan Taylor <dylan@dylanmtaylor.com>2021-05-20 17:55:40 -0400
commite6befe53c75b65c88d8f018efc2e6c9479232e9f (patch)
tree66c3c3f3f905f0a270a464f3f0047e5b56b12c48 /archinstall
parent5652ba20aebf11fa482c74cd85468bd092bc8213 (diff)
Use {installation.target} in custom commands handler
Diffstat (limited to 'archinstall')
-rw-r--r--archinstall/lib/general.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/archinstall/lib/general.py b/archinstall/lib/general.py
index 19b7b31c..249c7890 100644
--- a/archinstall/lib/general.py
+++ b/archinstall/lib/general.py
@@ -368,11 +368,11 @@ def pid_exists(pid: int):
return False
-def run_custom_user_commands(commands):
+def run_custom_user_commands(commands, installation):
for index, command in enumerate(commands):
log(f'Executing custom command "{command}" ...', fg='yellow')
- with open(f"/mnt/var/tmp/user-command.{index}.sh", "w") as temp_script:
+ with open(f"{installation.target}/var/tmp/user-command.{index}.sh", "w") as temp_script:
temp_script.write(command)
- execution_output = SysCommand(f"arch-chroot /mnt bash /var/tmp/user-command.{index}.sh")
+ execution_output = SysCommand(f"arch-chroot {installation.target} bash /var/tmp/user-command.{index}.sh")
log(execution_output)
- os.unlink(f"/mnt/var/tmp/user-command.{index}.sh")
+ os.unlink(f"{installation.target}/var/tmp/user-command.{index}.sh")