Bugzilla – Attachment 90689 Details for
Bug 23141
The Debian scripts do not use the MySQL port number
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23141: Add mysql portnumber support when populating db
Bug-23141-Add-mysql-portnumber-support-when-popula.patch (text/plain), 2.17 KB, created by
Andreas Jonsson
on 2019-06-17 19:00:51 UTC
(
hide
)
Description:
Bug 23141: Add mysql portnumber support when populating db
Filename:
MIME Type:
Creator:
Andreas Jonsson
Created:
2019-06-17 19:00:51 UTC
Size:
2.17 KB
patch
obsolete
>From 662179cc24f05250d5542ef4d05d7d56124f0224 Mon Sep 17 00:00:00 2001 >From: Andreas Jonsson <andreas.jonsson@kreablo.se> >Date: Mon, 17 Jun 2019 20:07:40 +0200 >Subject: [PATCH] Bug 23141: Add mysql portnumber support when populating db > >--- > debian/scripts/koha-create | 16 +++++++++++++--- > 1 file changed, 13 insertions(+), 3 deletions(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 5e60f7cd77..2402bdf56f 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -118,7 +118,7 @@ generate_config_file() { > } > > getmysqlhost() { >- if [ ! -f /etc/mysql/debian.cnf ] >+ if [ ! -f /etc/mysql/koha-common.cnf ] > then > echo localhost > return >@@ -143,6 +143,14 @@ getinstancemysqldatabase() { > xmlstarlet sel -t -v 'yazgfs/config/database' "/etc/koha/sites/$1/koha-conf.xml" > } > >+getinstancemysqlport() { >+ xmlstarlet sel -t -v 'yazgfs/config/port' "/etc/koha/sites/$1/koha-conf.xml" >+} >+ >+getinstancemysqlhost() { >+ xmlstarlet sel -t -v 'yazgfs/config/hostname' "/etc/koha/sites/$1/koha-conf.xml" >+} >+ > check_apache_config() > { > >@@ -686,13 +694,15 @@ then > # something. > mysqluser=$(getinstancemysqluser $name) > mysqldb=$(getinstancemysqldatabase $name) >+ mysqlhost=$(getinstancemysqlhost $name) >+ mysqlport=$(getinstancemysqlport $name) > # Use the default database content if that exists. > if [ -e "$DEFAULTSQL" ] > then > # Populate the database with default content. > zcat -f "$DEFAULTSQL" | > sed "s/__KOHASITE__/koha_$name/g" | >- mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpwd" "$mysqldb" >+ mysql --host="$mysqlhost" --port="$mysqlport" --user="$mysqluser" --password="$mysqlpwd" "$mysqldb" > > > # Change the default user's password. >@@ -701,7 +711,7 @@ then > perl -e ' > use Digest::MD5 qw(md5_base64); > while (<>) { print md5_base64($_), "\n"; }') >- mysql --host="$mysqlhost" --user="$mysqluser" \ >+ mysql --host="$mysqlhost" --port="$mysqlport" --user="$mysqluser" \ > --password="$mysqlpwd" <<eof > USE \`$mysqldb\`; > UPDATE borrowers >-- >2.11.0
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 23141
:
90687
|
90688
|
90689
|
91291
|
91292
|
91300
|
91408
|
105895
|
105896
|
105897
|
105898
|
105899
|
113605
|
113606
|
113607
|
113608
|
113609