mirror of
https://github.com/terem42/zfs-hetzner-vm.git
synced 2025-12-22 14:58:32 +00:00
Fix dropbear setup (#60)
fix dropbear across Ubuntu and Debian variants
This commit is contained in:
@@ -770,17 +770,17 @@ if [[ $v_encrypt_rpool == "1" ]]; then
|
||||
|
||||
rm -rf "$c_zfs_mount_dir/etc/dropbear-initramfs/dropbear_dss_host_key"
|
||||
|
||||
cd "$c_zfs_mount_dir/root"
|
||||
wget http://ftp.de.debian.org/debian/pool/main/libt/libtommath/libtommath1_1.1.0-3_amd64.deb
|
||||
wget http://ftp.de.debian.org/debian/pool/main/d/dropbear/dropbear-bin_2018.76-5_amd64.deb
|
||||
wget http://ftp.de.debian.org/debian/pool/main/d/dropbear/dropbear-initramfs_2018.76-5_all.deb
|
||||
#cd "$c_zfs_mount_dir/root"
|
||||
#wget http://ftp.de.debian.org/debian/pool/main/libt/libtommath/libtommath1_1.1.0-3_amd64.deb
|
||||
#wget http://ftp.de.debian.org/debian/pool/main/d/dropbear/dropbear-bin_2018.76-5_amd64.deb
|
||||
#wget http://ftp.de.debian.org/debian/pool/main/d/dropbear/dropbear-initramfs_2018.76-5_all.deb
|
||||
|
||||
chroot_execute "dpkg -i /root/libtommath1_1.1.0-3_amd64.deb"
|
||||
chroot_execute "dpkg -i /root/dropbear-bin_2018.76-5_amd64.deb"
|
||||
chroot_execute "dpkg -i /root/dropbear-initramfs_2018.76-5_all.deb"
|
||||
#chroot_execute "dpkg -i /root/libtommath1_1.1.0-3_amd64.deb"
|
||||
#chroot_execute "dpkg -i /root/dropbear-bin_2018.76-5_amd64.deb"
|
||||
#chroot_execute "dpkg -i /root/dropbear-initramfs_2018.76-5_all.deb"
|
||||
|
||||
rm $c_zfs_mount_dir/root/*.deb
|
||||
cd /root
|
||||
#rm $c_zfs_mount_dir/root/*.deb
|
||||
#cd /root
|
||||
fi
|
||||
|
||||
echo "============setup root prompt============"
|
||||
@@ -793,6 +793,7 @@ CONF
|
||||
|
||||
echo "========running packages upgrade==========="
|
||||
chroot_execute "apt upgrade --yes"
|
||||
chroot_execute "apt purge cryptsetup* --yes"
|
||||
|
||||
echo "===========add static route to initramfs via hook to add default routes due to Ubuntu initramfs DHCP bug ========="
|
||||
mkdir -p "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount"
|
||||
@@ -816,8 +817,8 @@ esac
|
||||
|
||||
configure_networking
|
||||
|
||||
ip route add 172.31.1.1/255.255.255.255 dev ens3
|
||||
ip route add default via 172.31.1.1 dev ens3
|
||||
ip route add 172.31.1.1/255.255.255.255 dev eth0
|
||||
ip route add default via 172.31.1.1 dev eth0
|
||||
CONF
|
||||
|
||||
chmod 755 "$c_zfs_mount_dir/usr/share/initramfs-tools/scripts/init-premount/static-route"
|
||||
|
||||
Reference in New Issue
Block a user