#
default_db_type=@DEFAULT_DB_TYPE@
+user=${2:-@db_user@}
#
# See if the fifth argument is a valid backend name.
else
MYSQLHOST=""
fi
- ${BINDIR}/mysqldump -u ${2}${MYSQLPASSWORD}${MYSQLHOST} -f --opt $1 >$1.sql
+ ${BINDIR}/mysqldump -u ${user}${MYSQLPASSWORD}${MYSQLHOST} -f --opt $1 >$1.sql
;;
postgresql)
BINDIR=@POSTGRESQL_BINDIR@
PGHOST=""
fi
# you could also add --compress for compression. See man pg_dump
- exec ${BINDIR}/pg_dump -c $PGHOST -U $2 $1 >$1.sql
+ exec ${BINDIR}/pg_dump -c $PGHOST -U $user $1 >$1.sql
;;
esac
#