minor hotfix

This commit is contained in:
Patrick 2024-11-10 18:30:56 +01:00
parent 87dc4c9133
commit f91469be86
7 changed files with 15 additions and 15 deletions

View file

@ -4,7 +4,7 @@
"download_link": "http://deb.debian.org/debian/",
"download_name": "bookworm",
"packages": "grub-pc linux-image-amd64 task-gnome-desktop",
"script": [
"scripts": [
"configs/scripts/install.sh"
],
"package_manager": "apt"

View file

@ -4,7 +4,7 @@
"download_link": "http://deb.debian.org/debian/",
"download_name": "bookworm",
"packages": "grub-pc linux-image-amd64 task-kde-desktop",
"script": [
"scripts": [
"configs/scripts/install.sh"
],
"package_manager": "apt"

View file

@ -4,7 +4,7 @@
"download_link": "http://deb.debian.org/debian/",
"download_name": "bookworm",
"packages": "nginx grub-pc linux-image-amd64",
"script": [
"scripts": [
"configs/scripts/install.sh"
],
"package_manager": "apt"

View file

@ -4,7 +4,7 @@
"download_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz",
"download_name": "noble-base-amd64.tar.gz",
"packages": "grub-pc linux-image-generic ubuntu-desktop",
"script": [
"scripts": [
"configs/scripts/install.sh"
],
"package_manager": "apt"

View file

@ -4,7 +4,7 @@
"download_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz",
"download_name": "noble-base-amd64.tar.gz",
"packages": "grub-pc linux-image-generic kubuntu-desktop",
"script": [
"scripts": [
"configs/scripts/install.sh"
],
"package_manager": "apt"

View file

@ -4,7 +4,7 @@
"download_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz",
"download_name": "noble-base-amd64.tar.gz",
"packages": "nginx grub-pc linux-image-generic",
"script": [
"scripts": [
"configs/scripts/install.sh"
],
"package_manager": "apt"

18
main.py
View file

@ -123,20 +123,20 @@ def rootfs_package(identifier, scripts):
# distro specific
def ubuntu_rootfs_prepare(
download_link, download_name, packages, identifier, script, package_manager
download_link, download_name, packages, identifier, scripts, package_manager
):
rootfs_downloader(download_link, download_name)
generic_rootfs_prepare(packages, identifier, script, package_manager)
generic_rootfs_prepare(packages, identifier, scripts, package_manager)
def debian_rootfs_prepare(
download_link, download_name, packages, identifier, script, package_manager
download_link, download_name, packages, identifier, scripts, package_manager
):
command(f"sudo debootstrap --arch amd64 {download_name} {chroot} {download_link}")
generic_rootfs_prepare(packages, identifier, script, package_manager)
generic_rootfs_prepare(packages, identifier, scripts, package_manager)
def generic_rootfs_prepare(packages, identifier, script, package_manager):
def generic_rootfs_prepare(packages, identifier, scripts, package_manager):
prepare_chroot()
do_chroot_command("apt update -y")
do_chroot_command("apt full-upgrade -y")
@ -146,7 +146,7 @@ def generic_rootfs_prepare(packages, identifier, script, package_manager):
do_chroot_command("echo 'localmachine' > /etc/hostname")
close_chroot()
rootfs_creator(f"{identifier}.tar.gz")
rootfs_package(f"{output}{identifier}", script)
rootfs_package(f"{output}{identifier}", scripts)
# main
@ -196,7 +196,7 @@ def main():
download_name = data["download_name"]
packages = data["packages"]
identifier = data["identifier"]
script = data["script"]
scripts = data["scripts"]
package_manager = data["package_manager"]
match rootfs_type:
@ -206,7 +206,7 @@ def main():
download_name,
packages,
identifier,
script,
scripts,
package_manager,
)
case "debootstrap":
@ -215,7 +215,7 @@ def main():
download_name,
packages,
identifier,
script,
scripts,
package_manager,
)