X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;ds=sidebyside;f=bacula%2Fupdatedb%2Fupdate_sqlite_tables_7_to_8;h=15ddd3f4bf0680f5ec4b3412fee2c613b8041a51;hb=7cd66d2541ca69efe7f32e021fe93623f96a59a5;hp=f0a33a1663d1e13f38db9c526f17dd7a7c4deb67;hpb=89a0dc9e4bf6049175995cdec124dc97b62d831c;p=bacula%2Fbacula diff --git a/bacula/updatedb/update_sqlite_tables_7_to_8 b/bacula/updatedb/update_sqlite_tables_7_to_8 index f0a33a1663..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 <