removed hardcoded kernel version - regex, yay

This commit is contained in:
Marcus 2023-05-01 12:48:14 +02:00
parent 8ef991cdbf
commit faa1866049

View file

@ -86,7 +86,7 @@ cat <<EOF > build/chroot/tmp/install_base.sh
#!/bin/bash #!/bin/bash
message () { message () {
echo "== install_base: " "$1" echo "== install_base: $@"
} }
error () error ()
@ -175,12 +175,13 @@ echo "Europe/Berlin" > /etc/timezone && \\
message "apt clean" message "apt clean"
apt clean apt clean
KERNEL_VER="$(/usr/bin/dpkg -l "linux-image-*" | grep -E '^ii'| awk '{print $2}' | grep -E 'linux-image-[0-9]\.([0-9]|[0-9][0-9])\.([0-9]|[0-9][0-9])-([0-9]|[0-9][0-9])-amd64$')"
### but fetch packages for grub and kernel, so we do not need to download them ### but fetch packages for grub and kernel, so we do not need to download them
### in case nanodesk get installed to diska ### in case nanodesk get installed to diska
message "apt --download linux-image and grub packages to have them in cache for installation by user" message "apt --download linux-image and grub packages to have them in cache for installation by user"
apt -d --reinstall install \\ apt -d --reinstall install \\
linux-image-amd64 \\ linux-image-amd64 \\
linux-image-5.10.0-22-amd64 \\ $KERNEL_VER \\
grub-pc grub-pc-bin \\ grub-pc grub-pc-bin \\
grub-common \\ grub-common \\
grub2-common \\ grub2-common \\