From: Eric Bollengier Date: Fri, 30 Sep 2022 06:23:58 +0000 (+0200) Subject: update mysql updatedb script X-Git-Tag: Beta-15.0.0~437 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2a86e25ab6cfb80927988a32a7b1b36facce4681;p=thirdparty%2Fbacula.git update mysql updatedb script --- diff --git a/bacula/updatedb/update_mysql_tables_1025_to_1026.in b/bacula/updatedb/update_mysql_tables_1025_to_1026.in index 8d2ba76c3..f9bc73396 100644 --- a/bacula/updatedb/update_mysql_tables_1025_to_1026.in +++ b/bacula/updatedb/update_mysql_tables_1025_to_1026.in @@ -1,42 +1,2 @@ -#!/bin/sh -# -# Copyright (C) 2000-2022 Kern Sibbald -# License: BSD 2-Clause; see file LICENSE-FOSS -# -# Shell script to update MySQL -# -echo " " -echo "This script will update a Bacula MySQL database from version 1025 to 1026" -echo " " -bindir=@MYSQL_BINDIR@ -PATH="$bindir:$PATH" -db_name=${db_name:-@db_name@} +Summary: -mysql $* -D ${db_name} -e "select VersionId from Version\G" >/tmp/$$ -DBVERSION=`sed -n -e 's/^VersionId: \(.*\)$/\1/p' /tmp/$$` -if [ $DBVERSION != 1024 ] ; then - echo " " - echo "The existing database is version $DBVERSION !!" - echo "This script can only update an existing version 1025 database to version 1026." - echo "Error. Cannot upgrade this database." - echo " " - exit 1 -fi - -if mysql $* -f <