]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/updatedb/update_postgresql_tables_9_to_10.in
Remove last traces of @SQL_BINDIR@ and @DB_TYPE@
[bacula/bacula] / bacula / updatedb / update_postgresql_tables_9_to_10.in
index 97ecee2650bce3c55cffc0729fd966a21441b8a1..d620f29fe9e375bf0d70a520bae9855289802602 100644 (file)
@@ -8,11 +8,12 @@ echo " which is needed to convert from Bacula version 1.38.x to 2.0.0 or higher"
 echo "Depending on the size of your database,"
 echo "this script may take several minutes to run."
 echo " "
-bindir=@SQL_BINDIR@
-db_name=@db_name@
 
-if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
+bindir=@POSTGRESQL_BINDIR@
+PATH="$bindir:$PATH"
+db_name=${db_name:-@db_name@}
 
+if $bindir/psql -f - -d ${db_name} $* <<END-OF-DATA
 ALTER TABLE media ADD COLUMN DeviceId integer;
 UPDATE media SET DeviceId=0;
 ALTER TABLE media ADD COLUMN MediaTypeId integer;