From 56e36a0987ce12f25e1179369170dc84df968d28 Mon Sep 17 00:00:00 2001 From: Andrey Prokopenko Date: Mon, 21 Apr 2025 22:53:35 +0200 Subject: [PATCH] fix for issue 74 --- hetzner-debian10-zfs-setup.sh | 4 ++-- hetzner-debian11-zfs-setup.sh | 6 +++--- hetzner-debian12-zfs-setup.sh | 8 ++++---- hetzner-ubuntu18-zfs-setup.sh | 8 ++++---- hetzner-ubuntu20-zfs-setup.sh | 8 ++++---- hetzner-ubuntu22-zfs-setup.sh | 8 ++++---- 6 files changed, 21 insertions(+), 21 deletions(-) diff --git a/hetzner-debian10-zfs-setup.sh b/hetzner-debian10-zfs-setup.sh index 6455766..82009a1 100644 --- a/hetzner-debian10-zfs-setup.sh +++ b/hetzner-debian10-zfs-setup.sh @@ -399,7 +399,7 @@ function determine_kernel_variant { } function chroot_execute { - chroot $c_zfs_mount_dir bash -c "$1" + chroot $c_zfs_mount_dir bash -c "DEBIAN_FRONTEND=noninteractive $1" } function unmount_and_export_fs { @@ -750,7 +750,7 @@ chroot_execute "echo options zfs zfs_arc_max=$((v_zfs_arc_max_mb * 1024 * 1024)) echo "======= setting up grub ==========" chroot_execute "echo 'grub-pc grub-pc/install_devices_empty boolean true' | debconf-set-selections" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-pc" +chroot_execute "apt install --yes grub-pc" for disk in ${v_selected_disks[@]}; do chroot_execute "grub-install $disk" done diff --git a/hetzner-debian11-zfs-setup.sh b/hetzner-debian11-zfs-setup.sh index a606004..07407a3 100644 --- a/hetzner-debian11-zfs-setup.sh +++ b/hetzner-debian11-zfs-setup.sh @@ -400,7 +400,7 @@ function determine_kernel_variant { } function chroot_execute { - chroot $c_zfs_mount_dir bash -c "$1" + chroot $c_zfs_mount_dir bash -c "DEBIAN_FRONTEND=noninteractive $1" } function unmount_and_export_fs { @@ -754,8 +754,8 @@ chroot_execute "echo options zfs zfs_arc_max=$((v_zfs_arc_max_mb * 1024 * 1024)) echo "======= setting up grub ==========" chroot_execute "echo 'grub-pc grub-pc/install_devices_empty boolean true' | debconf-set-selections" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-legacy" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-pc" +chroot_execute "apt install --yes grub-legacy" +chroot_execute "apt install --yes grub-pc" for disk in ${v_selected_disks[@]}; do chroot_execute "grub-install --recheck $disk" done diff --git a/hetzner-debian12-zfs-setup.sh b/hetzner-debian12-zfs-setup.sh index 95b7d77..42fd6ce 100644 --- a/hetzner-debian12-zfs-setup.sh +++ b/hetzner-debian12-zfs-setup.sh @@ -400,7 +400,7 @@ function determine_kernel_variant { } function chroot_execute { - chroot $c_zfs_mount_dir bash -c "$1" + chroot $c_zfs_mount_dir bash -c "DEBIAN_FRONTEND=noninteractive $1" } function unmount_and_export_fs { @@ -753,8 +753,8 @@ chroot_execute "echo options zfs zfs_arc_max=$((v_zfs_arc_max_mb * 1024 * 1024)) echo "======= setting up grub ==========" chroot_execute "echo 'grub-pc grub-pc/install_devices_empty boolean true' | debconf-set-selections" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-legacy" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-pc" +chroot_execute "apt install --yes grub-legacy" +chroot_execute "apt install --yes grub-pc" for disk in ${v_selected_disks[@]}; do chroot_execute "grub-install --recheck $disk" done @@ -806,7 +806,7 @@ mkdir -p "$c_zfs_mount_dir/root/.ssh/" cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/root/.ssh/authorized_keys" echo "========running packages upgrade and autoremove===========" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt upgrade --yes" +chroot_execute "apt upgrade --yes" chroot_execute "apt purge cryptsetup* --yes" echo "===========add static route to initramfs via hook to add default routes for Hetzner due to Debian/Ubuntu initramfs DHCP bug =========" diff --git a/hetzner-ubuntu18-zfs-setup.sh b/hetzner-ubuntu18-zfs-setup.sh index 7760524..4c85f71 100644 --- a/hetzner-ubuntu18-zfs-setup.sh +++ b/hetzner-ubuntu18-zfs-setup.sh @@ -366,7 +366,7 @@ function determine_kernel_variant { } function chroot_execute { - chroot $c_zfs_mount_dir bash -c "$1" + chroot $c_zfs_mount_dir bash -c "DEBIAN_FRONTEND=noninteractive $1" } function unmount_and_export_fs { @@ -685,10 +685,10 @@ chroot_execute "rm -f /etc/localtime /etc/timezone" chroot_execute "dpkg-reconfigure tzdata -f noninteractive " echo "======= installing latest kernel=============" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes linux-headers${v_kernel_variant}-hwe-18.04 linux-image${v_kernel_variant}-hwe-18.04" +chroot_execute "apt install --yes linux-headers${v_kernel_variant}-hwe-18.04 linux-image${v_kernel_variant}-hwe-18.04" if [[ $v_kernel_variant == "-virtual" ]]; then # linux-image-extra is only available for virtual hosts - chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes linux-image-extra-virtual-hwe-18.04" + chroot_execute "apt install --yes linux-image-extra-virtual-hwe-18.04" fi echo "======= installing aux packages ==========" @@ -736,7 +736,7 @@ chroot_execute "echo options zfs zfs_arc_max=$((v_zfs_arc_max_mb * 1024 * 1024)) echo "======= setting up grub ==========" chroot_execute "echo 'grub-pc grub-pc/install_devices_empty boolean true' | debconf-set-selections" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-pc" +chroot_execute "apt install --yes grub-pc" for disk in ${v_selected_disks[@]}; do chroot_execute "grub-install $disk" done diff --git a/hetzner-ubuntu20-zfs-setup.sh b/hetzner-ubuntu20-zfs-setup.sh index 5c34738..d1da641 100644 --- a/hetzner-ubuntu20-zfs-setup.sh +++ b/hetzner-ubuntu20-zfs-setup.sh @@ -366,7 +366,7 @@ function determine_kernel_variant { } function chroot_execute { - chroot $c_zfs_mount_dir bash -c "$1" + chroot $c_zfs_mount_dir bash -c "DEBIAN_FRONTEND=noninteractive $1" } function unmount_and_export_fs { @@ -685,10 +685,10 @@ chroot_execute "rm -f /etc/localtime /etc/timezone" chroot_execute "dpkg-reconfigure tzdata -f noninteractive " echo "======= installing latest kernel=============" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes linux-headers${v_kernel_variant} linux-image${v_kernel_variant}" +chroot_execute "apt install --yes linux-headers${v_kernel_variant} linux-image${v_kernel_variant}" if [[ $v_kernel_variant == "-virtual" ]]; then # linux-image-extra is only available for virtual hosts - chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes linux-image-extra-virtual" + chroot_execute "apt install --yes linux-image-extra-virtual" fi @@ -737,7 +737,7 @@ chroot_execute "echo options zfs zfs_arc_max=$((v_zfs_arc_max_mb * 1024 * 1024)) echo "======= setting up grub ==========" chroot_execute "echo 'grub-pc grub-pc/install_devices_empty boolean true' | debconf-set-selections" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-pc" +chroot_execute "apt install --yes grub-pc" for disk in ${v_selected_disks[@]}; do chroot_execute "grub-install $disk" done diff --git a/hetzner-ubuntu22-zfs-setup.sh b/hetzner-ubuntu22-zfs-setup.sh index 85cfca5..723811c 100644 --- a/hetzner-ubuntu22-zfs-setup.sh +++ b/hetzner-ubuntu22-zfs-setup.sh @@ -366,7 +366,7 @@ function determine_kernel_variant { } function chroot_execute { - chroot $c_zfs_mount_dir bash -c "$1" + chroot $c_zfs_mount_dir bash -c "DEBIAN_FRONTEND=noninteractive $1" } function unmount_and_export_fs { @@ -685,10 +685,10 @@ chroot_execute "rm -f /etc/localtime /etc/timezone" chroot_execute "dpkg-reconfigure tzdata -f noninteractive " echo "======= installing latest kernel=============" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes linux-headers${v_kernel_variant} linux-image${v_kernel_variant}" +chroot_execute "apt install --yes linux-headers${v_kernel_variant} linux-image${v_kernel_variant}" if [[ $v_kernel_variant == "-virtual" ]]; then # linux-image-extra is only available for virtual hosts - chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes linux-image-extra-virtual" + chroot_execute "apt install --yes linux-image-extra-virtual" fi @@ -737,7 +737,7 @@ chroot_execute "echo options zfs zfs_arc_max=$((v_zfs_arc_max_mb * 1024 * 1024)) echo "======= setting up grub ==========" chroot_execute "echo 'grub-pc grub-pc/install_devices_empty boolean true' | debconf-set-selections" -chroot_execute "DEBIAN_FRONTEND=noninteractive apt install --yes grub-pc" +chroot_execute "apt install --yes grub-pc" for disk in ${v_selected_disks[@]}; do chroot_execute "grub-install $disk" done