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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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.