Bugzilla – Attachment 64560 Details for
Bug 9409
koha-create --request-db should be able to accept a dbhost option
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9409: Add --dbhost parameter and dbhost field
Bug-9409-Add---dbhost-parameter-and-dbhost-field.patch (text/plain), 2.94 KB, created by
Mark Tompsett
on 2017-06-23 01:49:09 UTC
(
hide
)
Description:
Bug 9409: Add --dbhost parameter and dbhost field
Filename:
MIME Type:
Creator:
Mark Tompsett
Created:
2017-06-23 01:49:09 UTC
Size:
2.94 KB
patch
obsolete
>From ea62db4bada73b50a9caa2573221c3a19bec6c58 Mon Sep 17 00:00:00 2001 >From: Mark Tompsett <mtompset@hotmail.com> >Date: Fri, 23 Jun 2017 01:46:50 +0000 >Subject: [PATCH] Bug 9409: Add --dbhost parameter and dbhost field > >This allows setting the remote db host correctly for >request-db either with a command-line or passwd file. >--- > debian/scripts/koha-create | 18 ++++++++++++++++-- > 1 file changed, 16 insertions(+), 2 deletions(-) > >diff --git a/debian/scripts/koha-create b/debian/scripts/koha-create >index ba4f043..be133a1 100755 >--- a/debian/scripts/koha-create >+++ b/debian/scripts/koha-create >@@ -66,6 +66,7 @@ Options: > --defaultsql some.sql Specify a default SQL file to be loaded on the DB. > --configfile cfg_file Specify an alternate config file for reading default values. > --passwdfile passwd Specify an alternate passwd file. >+ --dbhost host Enforce the use of the specified DB server > --database dbname Enforce the use of the specified DB name (64 char limit) > --adminuser n Explicit the admin user ID in the DB. Relevant in > conjunction with --defaultsql and --populate-db. >@@ -432,7 +433,7 @@ fi > > [ $# -ge 1 ] && [ $# -le 16 ] || ( usage ; die "Error: wrong parameters" ) > >-TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \ >+TEMP=`getopt -o chrpm:l:d:f:b:a: -l create-db,request-db,populate-db,use-db,use-memcached,enable-sru,sru-port:,help,marcflavor:,auth-idx:,biblio-idx:,zebralang:,defaultsql:,configfile:,passwdfile:,dbhost:,database:,adminuser:,memcached-servers:,memcached-prefix:,upload-path:,letsencrypt, \ > -n "$0" -- "$@"` > > # Note the quotes around `$TEMP': they are essential! >@@ -482,6 +483,8 @@ while true ; do > CLO_PASSWDFILE="$2" ; shift 2 ;; > -b|--database) > CLO_DATABASE="$2" ; shift 2 ;; >+ --dbhost) >+ CLO_DBHOST="$2" ; shift 2 ;; > -a|--adminuser) > CLO_ADMINUSER="$2" ; shift 2 ;; > --enable-sru) >@@ -600,6 +603,7 @@ then > mysqluser=`echo $passwdline | cut -d ":" -f 2` > mysqlpwd=`echo $passwdline | cut -d ":" -f 3` > mysqldb=`echo $passwdline | cut -d ":" -f 4` >+ mysqlhost=`echo $passwdline | cut -d ":" -f 5` > fi > > # The order of precedence for MySQL database name is: >@@ -608,6 +612,7 @@ if [ "$mysqldb" = "" ] > then > mysqldb="koha_$name" > fi >+ > if [ "$CLO_DATABASE" != "" ] > then > mysqldb="$CLO_DATABASE" >@@ -617,7 +622,16 @@ if [ "$mysqluser" = "" ] > then > mysqluser="koha_$name" > fi >-mysqlhost="$(getmysqlhost)" >+ >+if [ "$CLO_DBHOST" != "" ] >+then >+ mysqlhost="$CLO_DBHOST" >+fi >+ >+if [ "$mysqlhost" = "" ] >+then >+ mysqlhost="$(getmysqlhost)" >+fi > > if [ "$op" = create ] || [ "$op" = request ] || [ "$op" = use ] > then >-- >2.1.4
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 9409
:
64560
|
64760
|
65166
|
65922