Bug 5313 - allow creation of libraries with hyphens

Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
This commit is contained in:
Robin Sheat 2010-10-20 14:28:29 +13:00 committed by Chris Cormack
parent 554b6ad340
commit 4f4c4eceb3
2 changed files with 5 additions and 7 deletions

View File

@ -125,19 +125,17 @@ then
# Generate Zebra database password.
zebrapwd="$(pwgen -1)"
# Set up MySQL database for this instance.
if [ "$op" = create ]
then
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
CREATE DATABASE $mysqldb;
CREATE USER '$mysqluser'@'%' IDENTIFIED BY '$mysqlpwd';
GRANT ALL PRIVILEGES ON $mysqldb.* TO '$mysqluser';
CREATE DATABASE \`$mysqldb\`;
CREATE USER \`$mysqluser\`@'%' IDENTIFIED BY '$mysqlpwd';
GRANT ALL PRIVILEGES ON \`$mysqldb\`.* TO \`$mysqluser\`;
FLUSH PRIVILEGES;
eof
fi
# Generate and install Apache site-available file and log dir.
generate_config_file apache-site.conf.in \
"/etc/apache2/sites-available/$name"

View File

@ -25,8 +25,8 @@ do
echo "Removing Koha instance $name"
mysql --defaults-extra-file=/etc/mysql/koha-common.cnf <<eof
DROP USER 'koha_$name';
DROP DATABASE koha_$name;
DROP USER \`koha_$name\`;
DROP DATABASE \`koha_$name\`;
FLUSH PRIVILEGES;
eof