From b3b6278e206be11ce3b5a8e271f7bccb70539ac5 Mon Sep 17 00:00:00 2001 From: Magnus Enger Date: Thu, 30 Jun 2011 08:47:35 +0200 Subject: [PATCH] Bug 6517 - [REVISED] koha-create wants "use database" in DEFAULTSQL MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The revised patch quotes the variable $mysqldb, as suggested by Frère Sébastien Marie. This patch makes sure that pointing DEFAULTSQL in /etc/koha/koha-sites.conf to any (gzip'ed) file produced by mysqldump works, by adding the name of the database to the end of the call to mysql, when the specified SQL file is loaded. Files produced with koha-dump-defaults should still work too. To test: - Apply the patch - Create a new package with build-git-snapshot - Install the package - Create an SQL file from an existing installation with mysqldump - gzip the SQL file - point DEFAULTSQL to the file in /etc/koha/koha-sites.conf - create a new site with koha-create --create-db Signed-off-by: Chris Cormack --- debian/scripts/koha-create | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create index fee39b7889..ddfa0b0062 100755 --- a/debian/scripts/koha-create +++ b/debian/scripts/koha-create @@ -257,7 +257,7 @@ then # Populate the database with default content. zcat "$DEFAULTSQL" | sed "s/__KOHASITE__/$name/g" | - mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpwd" + mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpwd" "$mysqldb" # Change the default user's password. -- 2.39.5