Fix: usage function must be defined before actual use

pull/651/head
Francisco Miguel Biete 10 years ago
parent d0e9489a10
commit 226bfa24d6

@ -8,6 +8,12 @@ PROXYSQL_HOSTNAME="localhost"
PROXYSQL_PORT="6032"
#
function usage()
{
echo "Usage: $0 <hostgroup_id write> [hostgroup_id read] [number writers] [writers are readers 0|1} [log_file]"
exit 0
}
if [ "$1" = '-h' -o "$1" = '--help' -o -z "$1" ]
then
usage
@ -19,12 +25,6 @@ then
usage
fi
function usage()
{
echo "Usage: $0 <hostgroup_id write> [hostgroup_id read] [number writers] [writers are readers 0|1} [log_file]"
exit 0
}
HOSTGROUP_WRITER_ID="${1}"
HOSTGROUP_READER_ID="${2:--1}"
NUMBER_WRITERS="${3:-0}"

Loading…
Cancel
Save