infra/image/build.sh: Use consistent options for hostname

This patch makes the CLI argument for setting the image hostname
consistent with 'start.sh', settling on '-n HOSTNAME' for both scripts.
This commit is contained in:
Rafael Guterres Jeffman
2024-11-12 08:31:21 -03:00
parent 24569b850a
commit a96611fb3f

View File

@@ -15,7 +15,7 @@ valid_distro() {
usage() {
local prog="${0##*/}"
cat << EOF
usage: ${prog} [-h] [-p] [-c HOSTNAME] [-s] distro
usage: ${prog} [-h] [-p] [-n HOSTNAME] [-s] distro
${prog} build a container image to test ansible-freeipa.
EOF
}
@@ -29,7 +29,7 @@ positional arguments:
optional arguments:
-c HOSTNAME Container hostname
-n HOSTNAME Container hostname
-p Give extended privileges to the container
-s Deploy IPA server
EOF
@@ -43,11 +43,11 @@ quayname="quay.io/ansible-freeipa/upstream-tests"
deploy_server="N"
privileged=""
while getopts ":hc:ps" option
while getopts ":hn:ps" option
do
case "${option}" in
h) help && exit 0 ;;
c) hostname="${OPTARG}" ;;
n) hostname="${OPTARG}" ;;
p) privileged="privileged" ;;
s) deploy_server="Y" ;;
*) die -u "Invalid option: ${option}" ;;