Update vmcreate1.sh
This commit is contained in:
@@ -1,13 +1,21 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
show_help()
|
show_help()
|
||||||
echo 'Usage:'
|
echo 'Usage:'
|
||||||
echo 'vmcreate [-h][-a][-f filename]'
|
echo 'vmcreate [-h][-a][-k pub_keyfile][-f filename]'
|
||||||
echo 'Arguments:'
|
echo 'Arguments:'
|
||||||
echo '-h - show this help'
|
echo '-h - show this help;'
|
||||||
echo '-a - add hosts to HA affinity rules'
|
echo '-a - add hosts to HA affinity rules;'
|
||||||
echo "-f - get IP addresses and Hostnames from 'flilename' "
|
echo "-f - get IP addresses and Hostnames from 'flilename';"
|
||||||
|
echo "-k - embed custom public key or create new if 'pub_keyfile' not specified"
|
||||||
|
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 ()
|
||||||
|
|
||||||
|
ip_check ()
|
||||||
|
|
||||||
|
hostame_generate()
|
||||||
|
|
||||||
mkfile ()
|
|
||||||
|
|
||||||
while getopts "a:f:h" opt; do
|
while getopts "a:f:h" opt; do
|
||||||
case $opt in
|
case $opt in
|
||||||
Reference in New Issue
Block a user