mirror of
https://github.com/terem42/zfs-hetzner-vm.git
synced 2026-01-10 07:22:50 +00:00
added dropbear conditional install
This commit is contained in:
@@ -759,7 +759,9 @@ for ((i = 1; i < ${#v_selected_disks[@]}; i++)); do
|
|||||||
dd if="${v_selected_disks[0]}-part1" of="${v_selected_disks[i]}-part1"
|
dd if="${v_selected_disks[0]}-part1" of="${v_selected_disks[i]}-part1"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ $v_encrypt_rpool == "1" ]]; then
|
||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
|
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
|
|
||||||
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
cp /root/.ssh/authorized_keys "$c_zfs_mount_dir/etc/dropbear-initramfs/authorized_keys"
|
||||||
@@ -776,6 +778,7 @@ chroot_execute "rm -rf /etc/ssh/ssh_host_ecdsa_key_temp"
|
|||||||
rm -rf "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key_temp"
|
rm -rf "$c_zfs_mount_dir/etc/ssh/ssh_host_ecdsa_key_temp"
|
||||||
|
|
||||||
rm -rf "$c_zfs_mount_dir/etc/dropbear-initramfs/dropbear_dss_host_key"
|
rm -rf "$c_zfs_mount_dir/etc/dropbear-initramfs/dropbear_dss_host_key"
|
||||||
|
fi
|
||||||
|
|
||||||
#cd "$c_zfs_mount_dir/root"
|
#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/libt/libtommath/libtommath1_1.1.0-3_amd64.deb
|
||||||
|
|||||||
@@ -732,6 +732,7 @@ for ((i = 1; i < ${#v_selected_disks[@]}; i++)); do
|
|||||||
dd if="${v_selected_disks[0]}-part1" of="${v_selected_disks[i]}-part1"
|
dd if="${v_selected_disks[0]}-part1" of="${v_selected_disks[i]}-part1"
|
||||||
done
|
done
|
||||||
|
|
||||||
|
if [[ $v_encrypt_rpool == "1" ]]; then
|
||||||
echo "=========set up dropbear=============="
|
echo "=========set up dropbear=============="
|
||||||
chroot_execute "apt install --yes dropbear-initramfs"
|
chroot_execute "apt install --yes dropbear-initramfs"
|
||||||
|
|
||||||
@@ -761,6 +762,7 @@ chroot_execute "dpkg -i /root/dropbear-initramfs_2018.76-5_all.deb"
|
|||||||
|
|
||||||
rm $c_zfs_mount_dir/root/*.deb
|
rm $c_zfs_mount_dir/root/*.deb
|
||||||
cd /root
|
cd /root
|
||||||
|
fi
|
||||||
|
|
||||||
echo "============setup root prompt============"
|
echo "============setup root prompt============"
|
||||||
cat > "$c_zfs_mount_dir/root/.bashrc" <<CONF
|
cat > "$c_zfs_mount_dir/root/.bashrc" <<CONF
|
||||||
|
|||||||
Reference in New Issue
Block a user