olafz / percona-clustercheck

Script to make a proxy (ie HAProxy) capable of monitoring Percona XtraDB Cluster nodes properly. The clustercheck script is distributed under the BSD license.
BSD 3-Clause "New" or "Revised" License
173 stars 108 forks source link

Passing empty string arguments Issue #3 #4

Closed LoicMahieu closed 11 years ago

LoicMahieu commented 11 years ago

The possibility to have mysql credentials as a parameter is a great idea but in our case, we want to use credentials stored in my.cnf. Because ${1:-default} treat an empty string argument as non-valid, this cases are impossible at this time:

# Lease empty in order to mysql uses my.cnf to credentials
clustercheck "" ""
# User clustercheck with empty password
clustercheck "clustercheck" ""

I don't know what solution would be the most elegant... Any idea?

(sorry for the duplicate issue, I'm a Github newbie)