summaryrefslogtreecommitdiffstats
path: root/ctdb/tests/UNIT/eventscripts/stubs/ctdb_killtcp
diff options
context:
space:
mode:
Diffstat (limited to 'ctdb/tests/UNIT/eventscripts/stubs/ctdb_killtcp')
-rwxr-xr-xctdb/tests/UNIT/eventscripts/stubs/ctdb_killtcp9
1 files changed, 9 insertions, 0 deletions
diff --git a/ctdb/tests/UNIT/eventscripts/stubs/ctdb_killtcp b/ctdb/tests/UNIT/eventscripts/stubs/ctdb_killtcp
new file mode 100755
index 0000000..cb5b6e5
--- /dev/null
+++ b/ctdb/tests/UNIT/eventscripts/stubs/ctdb_killtcp
@@ -0,0 +1,9 @@
+#!/bin/sh
+
+# Only supports reading from stdin
+
+iface="$1" # ignored
+
+while read src dst ; do
+ sed -i -e "/^${dst} ${src}\$/d" "$FAKE_NETSTAT_TCP_ESTABLISHED_FILE"
+done