Index: trunk/packages/sipb-xen-database/debian/changelog
===================================================================
--- trunk/packages/sipb-xen-database/debian/changelog	(revision 987)
+++ trunk/packages/sipb-xen-database/debian/changelog	(revision 989)
@@ -1,2 +1,9 @@
+sipb-xen-database (10.25) unstable; urgency=low
+
+  * add remote and console to pg_hba.conf template
+  * fix init script so it works
+
+ -- Greg Price <price@mit.edu>  Wed, 01 Oct 2008 19:30:26 -0400
+
 sipb-xen-database (10.24) unstable; urgency=low
 
Index: trunk/packages/sipb-xen-database/debian/sipb-xen-database-server.init
===================================================================
--- trunk/packages/sipb-xen-database/debian/sipb-xen-database-server.init	(revision 987)
+++ trunk/packages/sipb-xen-database/debian/sipb-xen-database-server.init	(revision 989)
@@ -10,68 +10,30 @@
 ### END INIT INFO
 
-# Author: SIPB Xen Project <sipb-xen@mit.edu>
-
-# Do NOT "set -e"
-
-# PATH should only include /usr/* if it runs after the mountnfs.sh script
-PATH=/sbin:/usr/sbin:/bin:/usr/bin
-DESC="The sipb-xen database server"
-NAME=sipb-xen-database-server
-
-
-
-SCRIPTNAME=/etc/init.d/$NAME
+PACKAGE=sipb-xen-database-tables
 
 # Exit if the package is not installed
-[ -x "/usr/bin/sipb-xen-database-tabales" ] || exit 0
+[ -x "/usr/bin/sipb-xen-database-tables" ] || exit 0
 
-# Read configuration variable file if it is present
-[ -r /etc/default/$NAME ] && . /etc/default/$NAME
-
-# Load the VERBOSE setting and other rcS variables
 . /lib/init/vars.sh
-
-# Define LSB log_* functions.
-# Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
 . /lib/lsb/init-functions
 
 gen_config()
 {
-    for i in /etc/postgresql/8.3/main/pg_hba.conf
-             ; do
-        mako-render $i.mako > $i
-    done
-}
-
-do_reload()
-{
-	gen_config
-
+  for i in /etc/postgresql/8.3/main/pg_hba.conf
+  do mako-render $i.mako > $i
+  done
 }
 
 case "$1" in
-  start)
-	[ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
-gen_config
-	;;
+  start|reload|force-reload|restart)
+    log_begin_msg "Reloading config for $PACKAGE"
+    gen_config
+    log_end_msg $?
+    /etc/init.d/postgresql-8.3 "$1"
+    ;;
   stop)
-	;;
-  reload|force-reload)
-	log_daemon_msg "Reloading $DESC" "$NAME"
-	do_reload
-	log_end_msg $?
-	;;
-  restart)
-	  *)
-	  	# Failed to stop
-		log_end_msg 1
-		;;
-	esac
-	;;
+    ;;
   *)
-	echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
-	exit 3
-	;;
+    log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}"
+    ;;
 esac
-
-:
Index: trunk/packages/sipb-xen-database/server/etc/postgresql/8.3/main/pg_hba.conf.mako
===================================================================
--- trunk/packages/sipb-xen-database/server/etc/postgresql/8.3/main/pg_hba.conf.mako	(revision 987)
+++ trunk/packages/sipb-xen-database/server/etc/postgresql/8.3/main/pg_hba.conf.mako	(revision 989)
@@ -83,6 +83,5 @@
 # IPv6 local connections:
 host    all         all         ::1/128               md5
-host	${cfg.db.dbname}	${cfg.db.user}	${cfg.db.ip}/32	trust
-% for h in cfg.hosts:
-host	${cfg.db.dbname}	${cfg.db.user}	${h.ip}/32	trust
+% for m in cfg.hosts + [cfg.db, cfg.remote, cfg.console]:
+host	${cfg.db.dbname}	${cfg.db.user}	${m.ip}/32	trust
 % endfor
