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 time
|
||||||
|
|
||||||
import archinstall
|
import archinstall
|
||||||
from archinstall.lib.general import SysCommand
|
|
||||||
from archinstall.lib.hardware import has_uefi
|
from archinstall.lib.hardware import has_uefi
|
||||||
from archinstall.lib.networking import check_mirror_reachable
|
from archinstall.lib.networking import check_mirror_reachable
|
||||||
from archinstall.lib.profiles import Profile
|
from archinstall.lib.profiles import Profile
|
||||||
|
from archinstall.lib.systemd import Boot
|
||||||
|
|
||||||
if archinstall.arguments.get('help'):
|
if archinstall.arguments.get('help'):
|
||||||
print("See `man archinstall` for 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():
|
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:
|
with archinstall.arguments['profile'].load_instructions(namespace=f"{archinstall.arguments['profile'].namespace}.py") as imported:
|
||||||
if not imported._prep_function():
|
if not imported._prep_function():
|
||||||
archinstall.log(
|
archinstall.log(' * Profile\'s preparation requirements was not fulfilled.', fg='red')
|
||||||
' * Profile\'s preparation requirements was not fulfilled.',
|
|
||||||
fg='red'
|
|
||||||
)
|
|
||||||
exit(1)
|
exit(1)
|
||||||
|
|
||||||
# Ask about audio server selection if one is not already set
|
# Ask about audio server selection if one is not already set
|
||||||
|
|
@ -384,10 +381,10 @@ def perform_installation(mountpoint):
|
||||||
|
|
||||||
# If the user provided custom commands to be run post-installation, execute them now.
|
# If the user provided custom commands to be run post-installation, execute them now.
|
||||||
if len(archinstall.arguments['custom-commands']):
|
if len(archinstall.arguments['custom-commands']):
|
||||||
for command in archinstall.arguments['custom-commands']:
|
with Boot(archinstall) as session:
|
||||||
archinstall.log(f'Executing custom command "{command}" ...', fg='yellow')
|
for command in archinstall.arguments['custom-commands']:
|
||||||
SysCommand(f"arch-chroot /mnt bash -c '{command}'")
|
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")
|
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'):
|
if not archinstall.arguments.get('silent'):
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue