Update vmcreate.sh
This commit is contained in:
@@ -227,6 +227,10 @@ if [ $pubkey ]; then
|
|||||||
else
|
else
|
||||||
read -p "Public key not specified. Use default? Enter to continue or Ctrl+C to abort"
|
read -p "Public key not specified. Use default? Enter to continue or Ctrl+C to abort"
|
||||||
fi
|
fi
|
||||||
|
if [[ (head -c 7 "$pubkey") -ne "ssh-rsa" ]]; then
|
||||||
|
echo "$pubkey is not a valid public key. Make sure you specified PUBLIC key."
|
||||||
|
exit 6
|
||||||
|
fi
|
||||||
|
|
||||||
# Проверяем, что нет ВМ в списке и нет сниппетов
|
# Проверяем, что нет ВМ в списке и нет сниппетов
|
||||||
for line in $(cat hosts.tmp)
|
for line in $(cat hosts.tmp)
|
||||||
|
|||||||
Reference in New Issue
Block a user