ctdb-scripts: Avoid chellcheck warning SC2012 (ls for file list)
authorMartin Schwenke <martin@meltin.net>
Wed, 13 Jul 2016 01:50:58 +0000 (11:50 +1000)
committerAmitay Isaacs <amitay@samba.org>
Thu, 21 Jul 2016 00:24:27 +0000 (02:24 +0200)
commit8bd2c55f98e3fe337d762e01974f877b885fd8ab
treec69212378401a56461c926220a174f0ff7be272c
parent52b43d73e9fb925757d7a033b74c9c74bbcc7d32
ctdb-scripts: Avoid chellcheck warning SC2012 (ls for file list)

SC2012: Use find instead of ls to better handle non-alphanumeric filenames.

Make this cope better with unexpected whitespace.

Unfortunately, this results in shellcheck warning:

  SC2035: Use ./*.tdb.* so names with dashes won't become options.

No!  Then stat(1) will print ./file.tdb.X.  We want the basenames and
we know the filenames don't start with dashes.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/debug_locks.sh