[Koha-bugs] [Bug 21440] New: koha-create expects the file passed by $DEFAULTSQL to be in gzip format
bugzilla-daemon at bugs.koha-community.org
bugzilla-daemon at bugs.koha-community.org
Thu Sep 27 18:02:10 CEST 2018
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=21440
Bug ID: 21440
Summary: koha-create expects the file passed by $DEFAULTSQL to
be in gzip format
Change sponsored?: ---
Product: Koha
Version: master
Hardware: All
OS: All
Status: NEW
Severity: major
Priority: P3
Component: Installation and upgrade (command-line installer)
Assignee: koha-bugs at lists.koha-community.org
Reporter: arouss1980 at gmail.com
QA Contact: testopia at bugs.koha-community.org
When setting up a new Koha instance with `koha-create`, you have the
option of specifying an SQL file with default data to load. This is
done by setting the DEFAULTSQL variable in /etc/koha/koha-sites.conf
to point to a filename of your choice.
However, if you set the DEFAULTSQL variable to something like this:
DEFAULTSQL="/home/user/dump.sql"
and then run `koha-create --create-db instance`, you get this error:
gzip: /home/user/dump.sql: not in gzip format
This is due to the following code from debian/scripts/koha-create,
where the call to `zcat` fails if the file is not in gzip format.
if [ -e "$DEFAULTSQL" ]
then
# Populate the database with default content.
zcat "$DEFAULTSQL" |
sed "s/__KOHASITE__/koha_$name/g" |
mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpwd"
"$mysqldb"
--
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
More information about the Koha-bugs
mailing list