s4-devel: a useful script for giving DRS replication demos
authorAndrew Tridgell <tridge@samba.org>
Thu, 6 May 2010 13:22:11 +0000 (15:22 +0200)
committerAndrew Tridgell <tridge@samba.org>
Thu, 6 May 2010 13:25:18 +0000 (15:25 +0200)
source4/scripting/devel/watch_servers.sh [new file with mode: 0644]

diff --git a/source4/scripting/devel/watch_servers.sh b/source4/scripting/devel/watch_servers.sh
new file mode 100644 (file)
index 0000000..48209cb
--- /dev/null
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+[ $# -ge 3 ] || {
+    echo "Usage: watch_servers.sh DB1 DB2 PASSWORD SEARCH <attrs>"
+    exit 1
+}
+
+host1="$1"
+host2="$2"
+password="$3"
+search="$4"
+shift 4
+
+watch -n1 "echo '$host1:'; bin/ldbsearch -S -H $host1 -Uadministrator%$password '$search' description $* | egrep -v '^ref|Ref|returned|entries|referrals' | uniq; echo; echo '$host2:'; bin/ldbsearch -S -H $host2 -Uadministrator%$password '$search' description $* | egrep -v '^ref|Ref|returned|entries|referrals' | uniq;"