using cirros-per is desirable here, we do want to re-generate keys for a new instance and you're dropping that here.
maybe something like:
how_often="instance" # -f = file, -t = type (rsa or dss), -y = print public key (and check) if [ -e "$file" ] && ! dropbearkey -f "$file" -y; then how_often="always" rm -f "$file" echo "WARN: removing invalid $file" fi cirros-per "$how_often" ...
« Back to merge proposal
using cirros-per is desirable here, we do want to re-generate keys for a new instance and you're dropping that here.
maybe something like:
how_often= "instance" "always"
# -f = file, -t = type (rsa or dss), -y = print public key (and check)
if [ -e "$file" ] && ! dropbearkey -f "$file" -y; then
how_often=
rm -f "$file"
echo "WARN: removing invalid $file"
fi
cirros-per "$how_often" ...