Index: /trunk/lvs/debian/config/etc/ha.d/ldirectord-finger.sh
===================================================================
--- /trunk/lvs/debian/config/etc/ha.d/ldirectord-finger.sh	(revision 1200)
+++ /trunk/lvs/debian/config/etc/ha.d/ldirectord-finger.sh	(revision 1200)
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+read line
+line=${line%[:blank:]}
+line=${line%
+}
+
+if [ "${line:0:4}" = "GET " ]; then # HTTP request
+    echo "Content-type: text/plain"
+    echo
+    /sbin/ipvsadm
+else
+    /sbin/ipvsadm
+fi
Index: /trunk/lvs/debian/config/etc/ha.d/ldirectord-http.sh
===================================================================
--- /trunk/lvs/debian/config/etc/ha.d/ldirectord-http.sh	(revision 1200)
+++ /trunk/lvs/debian/config/etc/ha.d/ldirectord-http.sh	(revision 1200)
@@ -0,0 +1,22 @@
+#!/bin/bash
+
+# Read and ignore the request
+line=foo
+while [ -n "$line" ]; do
+    read line
+    line=${line%[:blank:]}
+    line=${line%
+}
+done
+
+# Generate an HTTP reply
+
+echo "HTTP/1.0 200 OK
+"
+echo "Content-type: text/html
+"
+echo "
+"
+echo "<html><head><title>scripts.mit.edu server status</title></head><body><h1>scripts.mit.edu server status</h1><p>The following table shows a list of the servers that are currently handling web requests for scripts.mit.edu:</p><table>"
+/sbin/ipvsadm -L -f 2 | sed 's/:0//; s/:Port//' | awk 'BEGIN { OFS="</td><td>" } /->/ { print "<tr><td>" $2, $4, $5, $6 "</td></tr>"}'
+echo "</table></body></html>"
Index: /trunk/lvs/debian/config/etc/inetd.conf
===================================================================
--- /trunk/lvs/debian/config/etc/inetd.conf	(revision 1199)
+++ /trunk/lvs/debian/config/etc/inetd.conf	(revision 1200)
@@ -39,3 +39,4 @@
 
 # Make it easy to remotely query these LVS servers
-79	stream	tcp	nowait	root	/sbin/ipvsadm
+79	stream	tcp	nowait	root	/etc/heartbeat/ldirectord-finger.sh
+78	stream	tcp	nowait	root	/etc/heartbeat/ldirectord-http.sh
Index: /trunk/lvs/debian/config/etc/network/if-up.d/iptables
===================================================================
--- /trunk/lvs/debian/config/etc/network/if-up.d/iptables	(revision 1199)
+++ /trunk/lvs/debian/config/etc/network/if-up.d/iptables	(revision 1200)
@@ -21,5 +21,5 @@
 iptables -A scripts -t mangle -m tcp -p tcp --dport 25 -j MARK --set-mark 3
 # Send finger-bound traffic to FWM 255 (the LVS director itself)
-iptables -A scripts -t mangle -m tcp -p tcp --dport 79 -j MARK --set-mark 255
+iptables -A scripts -t mangle -m tcp -p tcp --dport 78:79 -j MARK --set-mark 255
 # Send everything else to FWM 1 (primary)
 iptables -A scripts -t mangle -m mark --mark 0 -j MARK --set-mark 1
