fix 2.0
This commit is contained in:
parent
a7b966b4a3
commit
22b941800c
1 changed files with 8 additions and 7 deletions
15
main.py
15
main.py
|
@ -189,13 +189,6 @@ def apt_rootfs_prepare(
|
||||||
do_chroot_command(f"echo '{repository}' >/etc/apt/sources.list")
|
do_chroot_command(f"echo '{repository}' >/etc/apt/sources.list")
|
||||||
overwritten + True
|
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:
|
for extra_file in extra_files:
|
||||||
command(f"sudo cp '{extra_file}' '{chroot}/root'")
|
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("apt full-upgrade -y")
|
||||||
do_chroot_command(f"DEBIAN_FRONTEND=noninteractive apt install -y {packages}")
|
do_chroot_command(f"DEBIAN_FRONTEND=noninteractive apt install -y {packages}")
|
||||||
do_chroot_command("echo 'localmachine' > /etc/hostname")
|
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()
|
close_chroot()
|
||||||
rootfs_creator(f"{identifier}.tar.gz")
|
rootfs_creator(f"{identifier}.tar.gz")
|
||||||
rootfs_package(f"{output}{identifier}", scripts, extra_files)
|
rootfs_package(f"{output}{identifier}", scripts, extra_files)
|
||||||
|
|
Loading…
Reference in a new issue