Separate the SSH disabling and eventual poweroff steps in image-setup.

This commit is contained in:
Jarno Rantanen 2020-03-10 12:24:35 +02:00
parent 79a6539fac
commit 4fe960a666

View File

@ -250,8 +250,11 @@ rm temp
working "Removing SSH host keys & enable regeneration" working "Removing SSH host keys & enable regeneration"
ssh "sudo rm -f -v /etc/ssh/ssh_host_*_key* && sudo systemctl enable regenerate_ssh_host_keys" ssh "sudo rm -f -v /etc/ssh/ssh_host_*_key* && sudo systemctl enable regenerate_ssh_host_keys"
working "Removing temporary SSH pubkey, disabling SSH & shutting down" working "Removing temporary SSH pubkey & disabling SSH"
ssh "(echo > .ssh/authorized_keys) && sudo systemctl disable ssh && sudo shutdown -h now" ssh "(echo > .ssh/authorized_keys) && sudo systemctl disable ssh"
working "Powering off the Pi"
ssh "sudo poweroff"
question "Eject the SD card from the Pi, and mount it back to this computer (press enter when ready)" question "Eject the SD card from the Pi, and mount it back to this computer (press enter when ready)"
read read