ctdb-scripts: Add a 'rm' stub so statd-callout tests work correctly
authorAmitay Isaacs <amitay@gmail.com>
Thu, 5 Mar 2015 02:10:32 +0000 (13:10 +1100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 27 Apr 2015 21:54:48 +0000 (23:54 +0200)
statd-callout tries to remove global files from /var/lib/nfs/statd and
this causes errors in tests.  Add an rm stub that ignores attempts to
remove these files but invokes /bin/rm for anything else.

Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Pair-programmed-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Martin Schwenke <martin@meltin.net>
(cherry picked from commit 956e51707d7ddcff060352f54d11ff42bdcc51ef)

The last 10 patches address

Bug: https://bugzilla.samba.org/show_bug.cgi?id=11204

CTDB statd-callout does not scale.

ctdb/tests/eventscripts/stubs/rm [new file with mode: 0755]

diff --git a/ctdb/tests/eventscripts/stubs/rm b/ctdb/tests/eventscripts/stubs/rm
new file mode 100755 (executable)
index 0000000..64b4d18
--- /dev/null
@@ -0,0 +1,6 @@
+#!/bin/sh
+# Make statd-callout happy
+case "$*" in
+    */var/lib/nfs/statd/sm*) : ;;
+    *) exec /bin/rm "$@" ;;
+esac