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_link": "http://deb.debian.org/debian/",
"download_name": "bookworm", "download_name": "bookworm",
"packages": "grub-pc linux-image-amd64 task-gnome-desktop", "packages": "grub-pc linux-image-amd64 task-gnome-desktop",
"script": [ "scripts": [
"configs/scripts/install.sh" "configs/scripts/install.sh"
], ],
"package_manager": "apt" "package_manager": "apt"

View file

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

View file

@ -4,7 +4,7 @@
"download_link": "http://deb.debian.org/debian/", "download_link": "http://deb.debian.org/debian/",
"download_name": "bookworm", "download_name": "bookworm",
"packages": "nginx grub-pc linux-image-amd64", "packages": "nginx grub-pc linux-image-amd64",
"script": [ "scripts": [
"configs/scripts/install.sh" "configs/scripts/install.sh"
], ],
"package_manager": "apt" "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_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz",
"download_name": "noble-base-amd64.tar.gz", "download_name": "noble-base-amd64.tar.gz",
"packages": "grub-pc linux-image-generic ubuntu-desktop", "packages": "grub-pc linux-image-generic ubuntu-desktop",
"script": [ "scripts": [
"configs/scripts/install.sh" "configs/scripts/install.sh"
], ],
"package_manager": "apt" "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_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz",
"download_name": "noble-base-amd64.tar.gz", "download_name": "noble-base-amd64.tar.gz",
"packages": "grub-pc linux-image-generic kubuntu-desktop", "packages": "grub-pc linux-image-generic kubuntu-desktop",
"script": [ "scripts": [
"configs/scripts/install.sh" "configs/scripts/install.sh"
], ],
"package_manager": "apt" "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_link": "https://cdimage.ubuntu.com/ubuntu-base/noble/daily/current/noble-base-amd64.tar.gz",
"download_name": "noble-base-amd64.tar.gz", "download_name": "noble-base-amd64.tar.gz",
"packages": "nginx grub-pc linux-image-generic", "packages": "nginx grub-pc linux-image-generic",
"script": [ "scripts": [
"configs/scripts/install.sh" "configs/scripts/install.sh"
], ],
"package_manager": "apt" "package_manager": "apt"

18
main.py
View file

@ -123,20 +123,20 @@ def rootfs_package(identifier, scripts):
# distro specific # distro specific
def ubuntu_rootfs_prepare( 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) 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( 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}") 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() prepare_chroot()
do_chroot_command("apt update -y") do_chroot_command("apt update -y")
do_chroot_command("apt full-upgrade -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") do_chroot_command("echo 'localmachine' > /etc/hostname")
close_chroot() close_chroot()
rootfs_creator(f"{identifier}.tar.gz") rootfs_creator(f"{identifier}.tar.gz")
rootfs_package(f"{output}{identifier}", script) rootfs_package(f"{output}{identifier}", scripts)
# main # main
@ -196,7 +196,7 @@ def main():
download_name = data["download_name"] download_name = data["download_name"]
packages = data["packages"] packages = data["packages"]
identifier = data["identifier"] identifier = data["identifier"]
script = data["script"] scripts = data["scripts"]
package_manager = data["package_manager"] package_manager = data["package_manager"]
match rootfs_type: match rootfs_type:
@ -206,7 +206,7 @@ def main():
download_name, download_name,
packages, packages,
identifier, identifier,
script, scripts,
package_manager, package_manager,
) )
case "debootstrap": case "debootstrap":
@ -215,7 +215,7 @@ def main():
download_name, download_name,
packages, packages,
identifier, identifier,
script, scripts,
package_manager, package_manager,
) )