]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix error message in grant_postgresql_privileges
authorEric Bollengier <eric@eb.homelinux.org>
Thu, 14 Jan 2010 13:48:13 +0000 (14:48 +0100)
committerEric Bollengier <eric@eb.homelinux.org>
Fri, 15 Jan 2010 08:50:10 +0000 (09:50 +0100)
bacula/src/cats/grant_postgresql_privileges.in

index 499381e9d35fd8c68a05edf6fba5f7be7d618276..19ee9bcf4a1d02f68917d7ef1d1715e99995d40a 100644 (file)
@@ -6,7 +6,7 @@ db_user=${db_user:-@db_user@}
 bindir=@SQL_BINDIR@
 db_name=${db_name:-@db_name@}
 
-if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
+$bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
 
 create user ${db_user};
 
@@ -54,6 +54,7 @@ grant select, update on locationlog_loclogid_seq   to ${db_user};
 grant select, update on log_logid_seq             to ${db_user};
 
 END-OF-DATA
+if [ $? -eq 0 ]
 then
    echo "Privileges for user ${db_user} granted on database ${db_name}."
    exit 0