Fixed style + debugging echo from r2781
[invirt/packages/invirt-database.git] / debian / invirt-database-server.postinst
index 86bc5d8..f5cd5a9 100644 (file)
@@ -28,7 +28,6 @@ set -e
 
 case "$1" in
     configure)
 
 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
         #Don't create users on upgrade
         if [ -z "$2" ]; then
             # Don't fail if the user/database already exists
@@ -37,7 +36,7 @@ case "$1" in
         fi
 
        # The invirt user *must* exist
         fi
 
        # The invirt user *must* exist
-       if [ -z `getent passwd invirt` ]; then
+       if ! getent passwd invirt >/dev/null 2>&1; then
            adduser --system invirt
        fi
        invoke-rc.d postgresql-8.3 restart
            adduser --system invirt
        fi
        invoke-rc.d postgresql-8.3 restart