[pkg-bacula-commits] [bacula] 01/01: make check for unsupported db version saner
Carsten Leonhardt
leo at moszumanska.debian.org
Tue Mar 21 00:06:38 UTC 2017
This is an automated email from the git hooks/post-receive script.
leo pushed a commit to branch master
in repository bacula.
commit 4dafb322c55ce4ffefe8efdecd67ccfc574d9a70
Author: Carsten Leonhardt <leo at debian.org>
Date: Tue Mar 21 00:54:15 2017 +0100
make check for unsupported db version saner
---
debian/scripts/install-dbconfig | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/debian/scripts/install-dbconfig b/debian/scripts/install-dbconfig
index 55f4c79..b299223 100755
--- a/debian/scripts/install-dbconfig
+++ b/debian/scripts/install-dbconfig
@@ -110,15 +110,14 @@ for db in $variants; do
done
# check if this script needs to be updated
+# we check for all db types just to be on the safe side
for db in $variants; do
set_longdb
sourcefile="src/cats/make_"$longdb"_tables"
- # this looks where the current database version is inserted in the
- # make_(db)_tables script and extracts it
+ # this looks where the current database version is inserted in the make_(db)_tables script and extracts it
current_bacula_db_version=`sed -n 's/INSERT INTO Version (VersionId) VALUES (\([0-9]*\));/\1/ip' $sourcefile`
- # dbtarget was counted up one time too many
- if [ $current_bacula_db_version -ne $((dbtarget -1)) ]; then
+ if [ $current_bacula_db_version -ne $lastdbversion ]; then
echo "error: unsupported database version $current_bacula_db_version, please update $0!"
exit 1
fi
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-bacula/bacula.git
More information about the pkg-bacula-commits
mailing list