Ignore:
Timestamp:
Dec 24, 2009, 7:00:01 PM (15 years ago)
Author:
gdb
Message:

Make invirt-database-server.postinst check whether the invirt user actually exists

Location:
trunk/packages/invirt-database/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-database/debian/changelog

    r2535 r2781  
     1invirt-database (0.2.3) unstable; urgency=low
     2
     3  * Test whether invirt user exists in postinst
     4
     5 -- Greg Brockman <gdb@mit.edu>  Thu, 24 Dec 2009 18:58:32 -0500
     6
    17invirt-database (0.2.2) unstable; urgency=low
    28
  • trunk/packages/invirt-database/debian/invirt-database-server.postinst

    r2218 r2781  
    2929case "$1" in
    3030    configure)
     31        echo "$2"
    3132        #Don't create users on upgrade
    3233        if [ -z "$2" ]; then
     
    3435            su postgres -c 'createuser invirt -S -d -R'    || true
    3536            su postgres -c 'createdb invirt -O invirt'   || true
    36             adduser --system invirt
    3737        fi
     38
     39        # The invirt user *must* exist
     40        if [ -z `getent passwd invirt` ]; then
     41            adduser --system invirt
     42        fi
    3843        invoke-rc.d postgresql-8.3 restart
    3944        su invirt -s /bin/sh -c 'invirt-database-tables create'
Note: See TracChangeset for help on using the changeset viewer.