X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=bacula%2Fupdatedb%2Fupdate_sqlite_tables_6_to_7;h=f5ad8884b19fc0b2eb44f1dc2b7eb07525b9ce84;hb=943ef07717af1afa3b32adb7127fe1b4f8e14671;hp=5dfd0ba9c1b6e157625eb9d13e87d8408879bcd5;hpb=0c0ef472876b8f353b29aa10768be88823d8399c;p=bacula%2Fbacula diff --git a/bacula/updatedb/update_sqlite_tables_6_to_7 b/bacula/updatedb/update_sqlite_tables_6_to_7 index 5dfd0ba9c1..f5ad8884b1 100755 --- a/bacula/updatedb/update_sqlite_tables_6_to_7 +++ b/bacula/updatedb/update_sqlite_tables_6_to_7 @@ -14,15 +14,15 @@ bindir=/usr/lib/sqlite cd /var/bacula if [ -s bacula.db ];then - DB_VER=`echo "select * from Version;" | $bindir/sqlite bacula.db | tail -n 1 2>/dev/null` - if [ -n "$DB_VER" ] && [ "$DB_VER" -ne "6" ]; then - echo "Sorry, this script is designed to update a version 6 database" - echo "and you have a version $DB_VER database." - exit 1 - fi + DB_VER=`echo "select * from Version;" | $bindir/sqlite bacula.db | tail -n 1 2>/dev/null` + if [ -n "$DB_VER" ] && [ "$DB_VER" -ne "6" ]; then + echo "Sorry, this script is designed to update a version 6 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 + echo "Sorry, I can't seem to locate a bacula database." + exit 1 fi $bindir/sqlite $* bacula.db <