ctdb-scripts: Drop optional argument to nfs_check_services()
authorMartin Schwenke <martin@meltin.net>
Wed, 29 Jun 2016 07:05:17 +0000 (17:05 +1000)
committerAmitay Isaacs <amitay@samba.org>
Wed, 6 Jul 2016 02:28:09 +0000 (04:28 +0200)
Added so that nfs_check_services() could be run against an arbirary
directory.  However, with the function moved to the event script, this
isn't useful.  CTDB_NFS_CHECKS_DIR can be used for testing instead.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/config/events.d/60.nfs

index eb12ad6ac4c2f1a8ea721fb37b2dea6ef3082d6f..07b4edf732da66b4bceaf399eea2b3ea2ed9b44c 100755 (executable)
@@ -25,12 +25,12 @@ service_reconfigure ()
 ######################################################
 # Check the health of NFS services
 #
-# Use .check files in given directory.
+# Use .check files in $CTDB_NFS_CHECKS_DIR.
 # Default is "${CTDB_BASE}/nfs-checks.d/"
 ######################################################
 nfs_check_services ()
 {
-    _dir="${1:-${CTDB_NFS_CHECKS_DIR:-${CTDB_BASE}/nfs-checks.d}}"
+    _dir="${CTDB_NFS_CHECKS_DIR:-${CTDB_BASE}/nfs-checks.d}"
 
     # Files must end with .check - avoids editor backups, RPM fu, ...
     for _f in "$_dir"/[0-9][0-9].*.check ; do