svn path=/trunk/packages/invirt-database/; revision=2781
+invirt-database (0.2.3) unstable; urgency=low
+
+ * Test whether invirt user exists in postinst
+
+ -- Greg Brockman <gdb@mit.edu> Thu, 24 Dec 2009 18:58:32 -0500
+
invirt-database (0.2.2) unstable; urgency=low
* Add builds table for storing build history.
case "$1" in
configure)
+ echo "$2"
#Don't create users on upgrade
if [ -z "$2" ]; then
# Don't fail if the user/database already exists
su postgres -c 'createuser invirt -S -d -R' || true
su postgres -c 'createdb invirt -O invirt' || true
- adduser --system invirt
fi
+
+ # The invirt user *must* exist
+ if [ -z `getent passwd invirt` ]; then
+ adduser --system invirt
+ fi
invoke-rc.d postgresql-8.3 restart
su invirt -s /bin/sh -c 'invirt-database-tables create'
;;