mirror of
https://github.com/terem42/zfs-hetzner-vm.git
synced 2025-12-22 14:58:32 +00:00
Merge pull request #3 from digineo/kernel_variant
Determine kernel variant
This commit is contained in:
@@ -26,6 +26,7 @@ declare -a v_selected_disks
|
||||
v_swap_size= # integer
|
||||
v_free_tail_space= # integer
|
||||
v_hostname=
|
||||
v_kernel_variant=
|
||||
v_zfs_arc_max_mb=
|
||||
v_root_password=
|
||||
v_encrypt_rpool= # 0=false, 1=true
|
||||
@@ -387,6 +388,12 @@ function ask_hostname {
|
||||
print_variables v_hostname
|
||||
}
|
||||
|
||||
function determine_kernel_variant {
|
||||
if dmidecode | grep vServer 2>&1; then
|
||||
v_kernel_variant="-cloud"
|
||||
fi
|
||||
}
|
||||
|
||||
function chroot_execute {
|
||||
chroot $c_zfs_mount_dir bash -c "$1"
|
||||
}
|
||||
@@ -683,7 +690,7 @@ chroot_execute "rm -f /etc/localtime /etc/timezone"
|
||||
chroot_execute "dpkg-reconfigure tzdata -f noninteractive "
|
||||
|
||||
echo "======= installing latest kernel============="
|
||||
chroot_execute "apt install --yes -t buster-backports linux-image-cloud-amd64 linux-headers-cloud-amd64"
|
||||
chroot_execute "apt install --yes -t buster-backports linux-image${v_kernel_variant}-amd64 linux-headers${v_kernel_variant}-amd64"
|
||||
|
||||
echo "======= installing aux packages =========="
|
||||
chroot_execute "apt install --yes man wget curl software-properties-common nano htop gnupg"
|
||||
|
||||
Reference in New Issue
Block a user