X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fupdatedb%2Fupdate_sqlite_tables_7_to_8;h=15ddd3f4bf0680f5ec4b3412fee2c613b8041a51;hb=43c27bf7839ceff6c9f07e72b219a50dfea21e63;hp=18823cc4abf4752fb75e8a3c714493f29edb21f4;hpb=d54db6839926e0af0385c079c37afe5dfb52fa58;p=bacula%2Fbacula diff --git a/bacula/updatedb/update_sqlite_tables_7_to_8 b/bacula/updatedb/update_sqlite_tables_7_to_8 index 18823cc4ab..15ddd3f4bf 100755 --- a/bacula/updatedb/update_sqlite_tables_7_to_8 +++ b/bacula/updatedb/update_sqlite_tables_7_to_8 @@ -8,10 +8,38 @@ echo "Depending on the size of your database," echo "this script may take several minutes to run." echo " " -bindir=/home/kern/bacula/depkgs/sqlite -cd /home/kern/bacula/working +bindir=/usr/bin -$bindir/sqlite $* bacula.db </dev/null`" +if [ -n "$DB_VER" ]; then + + if [ "$DB_VER" = "8" ]; then + echo "The Catalog is already at version 8. Nothing to do!" + exit 0 + elif [ "$DB_VER" -ne "7" ]; then + echo "Sorry, this script is designed to update a version 7 database" + echo "and you have a version $DB_VER database." + exit 1 + fi + +else + echo "Sorry, I can't seem to locate a bacula database." + exit 1 +fi + + +$bindir/sqlite $* bacula.db <