From eff36a836e2ac31a269dce28ad02f81de1ac0efc Mon Sep 17 00:00:00 2001 From: Greg Price Date: Fri, 24 Oct 2008 07:27:45 -0400 Subject: [PATCH] shorten sipb-xen-database-server initscript too svn path=/trunk/packages/sipb-xen-database/; revision=1216 --- debian/changelog | 6 ++++++ debian/control | 2 +- debian/sipb-xen-database-server.init | 30 +++++------------------------- 3 files changed, 12 insertions(+), 26 deletions(-) diff --git a/debian/changelog b/debian/changelog index e3406a8..39fb87e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +sipb-xen-database (10.35) unstable; urgency=low + + * Shorten initscript with spiffy new library from sipb-xen-base + + -- Greg Price Fri, 24 Oct 2008 07:25:56 -0400 + sipb-xen-database (10.34) unstable; urgency=low * yet another new-sqlalchemy fix, this one post-0.4.2 diff --git a/debian/control b/debian/control index cbd3229..cf574bd 100644 --- a/debian/control +++ b/debian/control @@ -14,7 +14,7 @@ Description: Installs the SIPB Xen database schema files Package: sipb-xen-database-server Architecture: all -Depends: ${misc:Depends}, ${python:Depends}, postgresql-8.3, python-sqlalchemy, python-psycopg2, sipb-xen-database-common, adduser +Depends: ${misc:Depends}, ${python:Depends}, postgresql-8.3, python-sqlalchemy, python-psycopg2, sipb-xen-database-common, adduser, sipb-xen-base Description: Installs the SIPB Xen database server This tracks all the user VMs and is accessed from the VM host diff --git a/debian/sipb-xen-database-server.init b/debian/sipb-xen-database-server.init index 431e675..c4e1537 100644 --- a/debian/sipb-xen-database-server.init +++ b/debian/sipb-xen-database-server.init @@ -10,30 +10,10 @@ ### END INIT INFO PACKAGE=sipb-xen-database-server +PARENTPACKAGE=postgresql-8.3 +GEN_FILES=/etc/postgresql/8.3/main/pg_hba.conf -# Exit if the package is not installed -[ -x "/usr/bin/sipb-xen-database-tables" ] || exit 0 +dpkg -s "$PACKAGE" >/dev/null 2>/dev/null || exit 0 -. /lib/init/vars.sh -. /lib/lsb/init-functions - -gen_config() -{ - for i in /etc/postgresql/8.3/main/pg_hba.conf - do mako-render $i.mako > $i - done -} - -case "$1" in - 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) - ;; - *) - log_success_msg "Usage: /etc/init.d/$PACKAGE {start|reload|force-reload|restart|stop}" - ;; -esac +. /lib/init/config-init.sh +config_init "$1" -- 1.7.9.5