chiark / gitweb /
rcheck: Supply a default list of hosts if none are given.
authorMark Wooding <mdw@distorted.org.uk>
Thu, 16 Apr 2015 10:51:06 +0000 (11:51 +0100)
committerMark Wooding <mdw@distorted.org.uk>
Thu, 16 Apr 2015 10:51:06 +0000 (11:51 +0100)
The default is :rcheck_hosts from /etc/slaves.

rcheck

diff --git a/rcheck b/rcheck
index 318aab6..c4f59a8 100755 (executable)
--- a/rcheck
+++ b/rcheck
@@ -12,6 +12,8 @@ do
   prog=$(readlink "${prog##*/}")
 done
 
+case $# in 0) set -- $(expand-list /etc/slaves :rcheck_hosts) ;; esac
+
 exec 4>&1
 rc=0
 for host in "$@"; do