From 213d026b8bbad7594e86b4377cdd3db404139c92 Mon Sep 17 00:00:00 2001 From: Eric Bollengier Date: Thu, 3 Dec 2009 18:38:30 +0100 Subject: [PATCH] Remove SQLite2 scripts --- bacula/src/cats/create_bacula_database.in | 2 +- bacula/src/cats/create_sqlite_database.in | 7 - .../src/cats/create_sqlite_database.in.patch | 4 - bacula/src/cats/drop_bacula_database.in | 4 +- bacula/src/cats/drop_bacula_tables.in | 4 +- bacula/src/cats/drop_sqlite_database.in | 13 - bacula/src/cats/drop_sqlite_tables.in | 9 - bacula/src/cats/grant_bacula_privileges.in | 2 +- bacula/src/cats/grant_sqlite_privileges.in | 7 - bacula/src/cats/make_bacula_tables.in | 2 +- bacula/src/cats/make_sqlite_tables.in | 397 ------------------ bacula/src/cats/make_sqlite_tables.in.patch | 4 - bacula/src/cats/update_bacula_tables.in | 2 +- bacula/src/cats/update_sqlite_tables.in | 227 ---------- bacula/src/cats/update_sqlite_tables.in.patch | 11 - 15 files changed, 8 insertions(+), 687 deletions(-) delete mode 100644 bacula/src/cats/create_sqlite_database.in delete mode 100644 bacula/src/cats/create_sqlite_database.in.patch delete mode 100644 bacula/src/cats/drop_sqlite_database.in delete mode 100644 bacula/src/cats/drop_sqlite_tables.in delete mode 100644 bacula/src/cats/grant_sqlite_privileges.in delete mode 100644 bacula/src/cats/make_sqlite_tables.in delete mode 100644 bacula/src/cats/make_sqlite_tables.in.patch delete mode 100644 bacula/src/cats/update_sqlite_tables.in delete mode 100644 bacula/src/cats/update_sqlite_tables.in.patch diff --git a/bacula/src/cats/create_bacula_database.in b/bacula/src/cats/create_bacula_database.in index 77f9bfc419..4db10bfe7d 100644 --- a/bacula/src/cats/create_bacula_database.in +++ b/bacula/src/cats/create_bacula_database.in @@ -3,7 +3,7 @@ # This routine creates the Bacula database # using PostgreSQL, MySQL, or SQLite. # -if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then +if test xsqlite3 = x@DB_TYPE@ ; then echo "Creating SQLite database" @scriptdir@/create_@DB_TYPE@_database else diff --git a/bacula/src/cats/create_sqlite_database.in b/bacula/src/cats/create_sqlite_database.in deleted file mode 100644 index e23d06eee2..0000000000 --- a/bacula/src/cats/create_sqlite_database.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# shell script to create Bacula SQLite tables -db_name=@db_name@ - -touch @working_dir@/${db_name}.db -exit 0 diff --git a/bacula/src/cats/create_sqlite_database.in.patch b/bacula/src/cats/create_sqlite_database.in.patch deleted file mode 100644 index 0469756f8e..0000000000 --- a/bacula/src/cats/create_sqlite_database.in.patch +++ /dev/null @@ -1,4 +0,0 @@ -5c5 -< bindir=@SQL_BINDIR@ ---- -> bindir=/usr/lib/bacula/sqlite diff --git a/bacula/src/cats/drop_bacula_database.in b/bacula/src/cats/drop_bacula_database.in index d927621f2b..bd1dbf158c 100755 --- a/bacula/src/cats/drop_bacula_database.in +++ b/bacula/src/cats/drop_bacula_database.in @@ -3,11 +3,11 @@ # Drop Bacula database -- works for whatever is configured, # MySQL, SQLite, PostgreSQL # -if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then +if test xsqlite3 = x@DB_TYPE@ ; then @scriptdir@/drop_@DB_TYPE@_database $* else if test xmysql = x@DB_TYPE@ ; then - echo "Dropping MySQL database" + echo "Making MySQL database" @scriptdir@/drop_mysql_database $* else @scriptdir@/drop_postgresql_database $* diff --git a/bacula/src/cats/drop_bacula_tables.in b/bacula/src/cats/drop_bacula_tables.in index 50ee20f9db..97509289ca 100755 --- a/bacula/src/cats/drop_bacula_tables.in +++ b/bacula/src/cats/drop_bacula_tables.in @@ -3,12 +3,12 @@ # Drop Bacula tables -- works for whatever is configured, # MySQL, SQLite, or PostgreSQL # -if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then +if test xsqlite3 = x@DB_TYPE@ ; then @scriptdir@/drop_@DB_TYPE@_tables $* echo "Dropped SQLite tables" else if test xmysql = x@DB_TYPE@ ; then - echo "Dropping MySQL tables" + echo "Making MySQL tables" @scriptdir@/drop_mysql_tables $* echo "Dropped MySQL tables" else diff --git a/bacula/src/cats/drop_sqlite_database.in b/bacula/src/cats/drop_sqlite_database.in deleted file mode 100644 index b405a7b46a..0000000000 --- a/bacula/src/cats/drop_sqlite_database.in +++ /dev/null @@ -1,13 +0,0 @@ -#!/bin/sh -# -# shell script to drop Bacula SQLite tables -db_name=@db_name@ - - -if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then - cd @working_dir@ - rm -rf ${db_name}.db - echo "SQLite database dropped." -else - echo "Bacula is not configured for an SQLite database." -fi diff --git a/bacula/src/cats/drop_sqlite_tables.in b/bacula/src/cats/drop_sqlite_tables.in deleted file mode 100644 index f966f875de..0000000000 --- a/bacula/src/cats/drop_sqlite_tables.in +++ /dev/null @@ -1,9 +0,0 @@ -#!/bin/sh -# -# shell script to Delete the SQLite tables, we simply delete and recreate -# the database. -# -db_name=@db_name@ - -rm -f @working_dir@/${db_name}.db -touch @working_dir@/${db_name}.db diff --git a/bacula/src/cats/grant_bacula_privileges.in b/bacula/src/cats/grant_bacula_privileges.in index 5e9f4e735f..eb290b7eb1 100755 --- a/bacula/src/cats/grant_bacula_privileges.in +++ b/bacula/src/cats/grant_bacula_privileges.in @@ -12,7 +12,7 @@ else echo "Granting PostgreSQL privileges" @scriptdir@/grant_postgresql_privileges $* else - if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then + if test xsqlite3 = x@DB_TYPE@ ; then echo "Granting SQLite privileges" @scriptdir@/grant_@DB_TYPE@_privileges $* fi diff --git a/bacula/src/cats/grant_sqlite_privileges.in b/bacula/src/cats/grant_sqlite_privileges.in deleted file mode 100644 index 452975ee58..0000000000 --- a/bacula/src/cats/grant_sqlite_privileges.in +++ /dev/null @@ -1,7 +0,0 @@ -#!/bin/sh -# -# shell script to grant privileges to the bacula database -# -bindir=@SQL_BINDIR@ - -# nothing to do here diff --git a/bacula/src/cats/make_bacula_tables.in b/bacula/src/cats/make_bacula_tables.in index 0c6dd12eb6..c8469f12bf 100755 --- a/bacula/src/cats/make_bacula_tables.in +++ b/bacula/src/cats/make_bacula_tables.in @@ -3,7 +3,7 @@ # This routine makes the appropriately configured # Bacula tables for PostgreSQL, MySQL, or SQLite. # -if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then +if test xsqlite3 = x@DB_TYPE@ ; then echo "Making SQLite tables" @scriptdir@/make_@DB_TYPE@_tables $* else diff --git a/bacula/src/cats/make_sqlite_tables.in b/bacula/src/cats/make_sqlite_tables.in deleted file mode 100644 index e8693f0715..0000000000 --- a/bacula/src/cats/make_sqlite_tables.in +++ /dev/null @@ -1,397 +0,0 @@ -#!/bin/sh -# -# shell script to create Bacula SQLite tables - -bindir=@SQL_BINDIR@ -cd @working_dir@ -sqlite=@DB_TYPE@ -db_name=@db_name@ - -${bindir}/${sqlite} $* ${db_name}.db < bindir=/usr/lib/bacula/sqlite diff --git a/bacula/src/cats/update_bacula_tables.in b/bacula/src/cats/update_bacula_tables.in index 1e7edbadd3..8ce59a573b 100755 --- a/bacula/src/cats/update_bacula_tables.in +++ b/bacula/src/cats/update_bacula_tables.in @@ -3,7 +3,7 @@ # This routine alters the appropriately configured # Bacula tables for PostgreSQL, MySQL, or SQLite. # -if test xsqlite = x@DB_TYPE@ -o xsqlite3 = x@DB_TYPE@ ; then +if test xsqlite3 = x@DB_TYPE@ ; then echo "Altering SQLite tables" @scriptdir@/update_@DB_TYPE@_tables $* fi diff --git a/bacula/src/cats/update_sqlite_tables.in b/bacula/src/cats/update_sqlite_tables.in deleted file mode 100644 index 10a88753a4..0000000000 --- a/bacula/src/cats/update_sqlite_tables.in +++ /dev/null @@ -1,227 +0,0 @@ -#!/bin/sh -# -# shell script to update SQLite from version 2.0 to 3.0 -# -echo " " -echo "This script will update a Bacula SQLite database from version 10 to 11" -echo " which is needed to convert from Bacula version 2.0.x to 3.0.x or higher" -echo "Depending on the size of your database," -echo "this script may take several minutes to run." -echo " " - -bindir=@SQL_BINDIR@ -cd @working_dir@ -sqlite=@DB_TYPE@ -db_name=@db_name@ - -${bindir}/${sqlite} $* ${db_name}.db <