update_mysql_database / update_postgresql_database quirk

Udo Kaune <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <[email protected]>
# excerpt from bacula-13.0.4.tar.gz update_mysql_database
# the if condition will trigger with DBVERSION=1023 despite being a 
legit upgrade step

OLDVERSION=1022
NEWVERSION=1024

if [ "$DBVERSION" -lt 1014 -o "$DBVERSION" -gt $OLDVERSION ] ; then
   if [ "$DBVERSION" -lt 12 -o "$DBVERSION" -gt 16 ] ; then
     echo " "
     echo "The existing database is version $DBVERSION !!"
     echo "This script can only update an existing version 12-16 or 
1014-$OLDVERSION database to version $NEWVERSION."
     echo "Error. Cannot upgrade this database."
     echo " "
     exit 1
   fi
fi

# the first if condition should read

if [ "$DBVERSION" -lt 1014 -o "$DBVERSION" -gt $*NEW*VERSION ] ; then

# the bug is still present in bacula-15.0.2.tar.gz

br, Udo

_______________________________________________
Bacula-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/bacula-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.