This commit is contained in:
Patrick 2024-11-14 15:42:45 +01:00
parent a7b966b4a3
commit 22b941800c

15
main.py
View file

@ -189,13 +189,6 @@ def apt_rootfs_prepare(
do_chroot_command(f"echo '{repository}' >/etc/apt/sources.list")
overwritten + True
for preinstall_script in preinstall_scripts:
command(f"sudo mv {preinstall_script} {chroot}/root")
do_chroot_command(f"cd root && ./{preinstall_script}")
if create_ca:
command(f"sudo cp {chroot}/etc/ssl/certs/ca.crt {output}")
for extra_file in extra_files:
command(f"sudo cp '{extra_file}' '{chroot}/root'")
@ -203,6 +196,14 @@ def apt_rootfs_prepare(
do_chroot_command("apt full-upgrade -y")
do_chroot_command(f"DEBIAN_FRONTEND=noninteractive apt install -y {packages}")
do_chroot_command("echo 'localmachine' > /etc/hostname")
for preinstall_script in preinstall_scripts:
command(f"sudo mv {preinstall_script} {chroot}/root")
do_chroot_command(f"cd root && ./{preinstall_script}")
if create_ca:
command(f"sudo cp {chroot}/etc/ssl/certs/ca.crt {output}")
close_chroot()
rootfs_creator(f"{identifier}.tar.gz")
rootfs_package(f"{output}{identifier}", scripts, extra_files)