Try to use the new systemd-nspawn code paths
This commit is contained in:
parent
c03da01412
commit
27fa511914
|
|
@ -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.")
|
||||
|
|
@ -187,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,13 +378,13 @@ def perform_installation(mountpoint):
|
|||
if not imported._post_install():
|
||||
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 len(archinstall.arguments['custom-commands']):
|
||||
for command in archinstall.arguments['custom-commands']:
|
||||
archinstall.log(f'Executing custom command "{command}" ...', fg='yellow')
|
||||
SysCommand(f"arch-chroot /mnt bash -c '{command}'")
|
||||
|
||||
with Boot(archinstall) as session:
|
||||
for command in archinstall.arguments['custom-commands']:
|
||||
archinstall.log(f'Executing custom command "{command}" ...', fg='yellow')
|
||||
session.SysCommand(["bash", "-c"] + command.split(' '))
|
||||
|
||||
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'):
|
||||
|
|
|
|||
Loading…
Reference in New Issue