From: Eric Bollengier Date: Fri, 4 Nov 2022 09:17:21 +0000 (+0100) Subject: Fix org#2628 About improving the update_bacula_tables script on up to date catalogs X-Git-Tag: Release-13.0.2~78 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6afef5c5df54801dcb2ea761f910eb9ea0d644e2;p=thirdparty%2Fbacula.git Fix org#2628 About improving the update_bacula_tables script on up to date catalogs --- diff --git a/bacula/src/cats/update_mysql_tables.in b/bacula/src/cats/update_mysql_tables.in index 6c710a507..7f2ab8698 100644 --- a/bacula/src/cats/update_mysql_tables.in +++ b/bacula/src/cats/update_mysql_tables.in @@ -47,6 +47,11 @@ if [ "x$DBVERSION" = x ]; then exit 1 fi +if [ "$DBVERSION" -eq "$NEWVERSION" ] ; then + echo "Current ${db_name} database is up-to-date (version $NEWVERSION)." + exit 0 +fi + if [ "$DBVERSION" -lt 1014 -o "$DBVERSION" -gt $OLDVERSION ] ; then if [ "$DBVERSION" -lt 12 -o "$DBVERSION" -gt 16 ] ; then echo " " diff --git a/bacula/src/cats/update_postgresql_tables.in b/bacula/src/cats/update_postgresql_tables.in index d0b64bf97..9b808305a 100644 --- a/bacula/src/cats/update_postgresql_tables.in +++ b/bacula/src/cats/update_postgresql_tables.in @@ -48,6 +48,11 @@ if [ "x$DBVERSION" = x ]; then exit 1 fi +if [ "$DBVERSION" -eq "$NEWVERSION" ] ; then + echo "Current ${db_name} database is up-to-date (version $NEWVERSION)." + exit 0 +fi + if [ "$DBVERSION" -lt 1014 -o "$DBVERSION" -gt $OLDVERSION ] ; then if [ "$DBVERSION" -lt 12 -o "$DBVERSION" -gt 16 ] ; then echo " "