Bugzilla – Attachment 113608 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: Parse mysql portnumber from /etc/mysql/koha-common.cnf
Bug-23141-Parse-mysql-portnumber-from-etcmysqlkoha.patch (text/plain), 1.67 KB, created by
Victor Grousset/tuxayo
on 2020-11-13 14:23:49 UTC
(
hide
)
Description:
Bug 23141: Parse mysql portnumber from /etc/mysql/koha-common.cnf
Filename:
MIME Type:
Creator:
Victor Grousset/tuxayo
Created:
2020-11-13 14:23:49 UTC
Size:
1.67 KB
patch
obsolete
>From 094af5a41e9541f421a838e87ff25fc214e5e2a2 Mon Sep 17 00:00:00 2001 >From: Andreas Jonsson <andreas.jonsson@kreablo.se> >Date: Thu, 4 Jul 2019 16:44:34 +0200 >Subject: [PATCH] Bug 23141: Parse mysql portnumber from > /etc/mysql/koha-common.cnf > >--- > debian/scripts/koha-create | 23 ++++++++++++++++++++++- > 1 file changed, 22 insertions(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 3c51d7df84..fb8fb73366 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -152,6 +152,22 @@ getmysqlhost() { > /etc/mysql/koha-common.cnf > } > >+getmysqlport() { >+ if [ -e /etc/mysql/koha-common.cnf ] >+ then >+ port=$(awk ' >+ BEGIN { FS="=" } >+ $1 ~/\[/ { inclient=0 } >+ $1 ~/\[client\]/ { inclient=1; next } >+ inclient==1 && $1 ~/port/ { gsub(/ /, "", $2); print $2 }' \ >+ /etc/mysql/koha-common.cnf) >+ else >+ port=3306 >+ fi >+ >+ echo $port >+} >+ > getinstancemysqlpassword() { > xmlstarlet sel -t -v 'yazgfs/config/pass' "/etc/koha/sites/$1/koha-conf.xml" > } >@@ -677,6 +693,11 @@ then > mysqlhost="$(getmysqlhost)" > fi > >+if [ "$mysqlport" = "" ] >+then >+ mysqlport="$(getmysqlport)" >+fi >+ > if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ] > then > if [ "$mysqlpwd" = "" ] >@@ -765,7 +786,7 @@ eof > touch "$name-db-request.txt" > chmod 0600 "$name-db-request.txt" > cat > "$name-db-request.txt" << eof >-Please create a MySQL database and user on $mysqlhost as follows: >+Please create a MySQL database and user on $mysqlhost port $mysqlport as follows: > > database name: $mysqldb > database user: $mysqluser >-- >2.29.2
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