Bugzilla – Attachment 67371 Details for
Bug 18564
koha-common.cnf parsing is too restrictive
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18564: Improve koha-common.cnf parsing to pick the mysql host
Bug-18564-Improve-koha-commoncnf-parsing-to-pick-t.patch (text/plain), 1.25 KB, created by
Jonathan Druart
on 2017-09-26 17:41:15 UTC
(
hide
)
Description:
Bug 18564: Improve koha-common.cnf parsing to pick the mysql host
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-09-26 17:41:15 UTC
Size:
1.25 KB
patch
obsolete
>From df211a8a0a21d1ece0724179f769be469b49c568 Mon Sep 17 00:00:00 2001 >From: Eric Vantillard <eric.vantillard@evaxion.fr> >Date: Tue, 9 May 2017 23:10:21 +0200 >Subject: [PATCH] Bug 18564: Improve koha-common.cnf parsing to pick the mysql > host > >my koha-common.cnf is using this form: > >[client] >host=db >user=root >password="move_rootpwd_to_dotenv" > >this file is working has expected with mysql tools. > >but koha-create parsing will not find the db host resulting in >koha-conf.xml containing no values in hostname element. > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > debian/scripts/koha-create | 7 ++++--- > 1 file changed, 4 insertions(+), 3 deletions(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index 74888bc39e..7b6b51297a 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -124,9 +124,10 @@ generate_config_file() { > > getmysqlhost() { > awk ' >- /^\[/ { inclient = 0 } >- /^\[client\]/ { inclient = 1 } >- inclient && /^ *host *=/ { print $3 }' \ >+ BEGIN { FS="=" } >+ $1 ~/\[/ { inclient=0 } >+ $1 ~/\[client\]/ { inclient=1; next } >+ inclient==1 && $1 ~/host/ { gsub(/ /, "", $2); print $2 }' \ > /etc/mysql/koha-common.cnf > } > >-- >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 18564
:
63501
|
64557
|
67371
|
68315