Update vmcreate1.sh
This commit is contained in:
18
vmcreate1.sh
18
vmcreate1.sh
@@ -10,15 +10,23 @@ show_help()
|
||||
echo "\nIf file not specified, script will use arguments as a list of IP addresses."
|
||||
echo "In this case Hostname will be inherited from 2 last IP octets. Example for 10.10.35.20: 'vm035020'."
|
||||
|
||||
make_file ()
|
||||
make_file (){
|
||||
|
||||
ip_check ()
|
||||
}
|
||||
|
||||
hostame_generate()
|
||||
ip_check (){
|
||||
|
||||
}
|
||||
|
||||
hostame_generate(){
|
||||
|
||||
}
|
||||
|
||||
keypair_generate (){
|
||||
|
||||
generate_keypair ()
|
||||
#указать в конце функции переменную для вывода названия приватного ключа
|
||||
privkey=
|
||||
}
|
||||
|
||||
while getopts "a:f:h" opt; do
|
||||
case $opt in
|
||||
@@ -51,7 +59,7 @@ do
|
||||
# ДОБАВИТЬ правило HA если $haadd
|
||||
done
|
||||
echo "VMs from 'hosts' successfully created"
|
||||
if [ -e $privkey ]
|
||||
if [ -v $privkey ]
|
||||
then
|
||||
echo "Generated private key $privkey"
|
||||
echo "SAVE IT!"
|
||||
|
||||
Reference in New Issue
Block a user