Bugzilla – Attachment 138457 Details for
Bug 30468
koha-mysql does not honor Koha's timezone setting
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30468: Restore 'set -e' and remove echos
Bug-30468-Restore-set--e-and-remove-echos.patch (text/plain), 2.44 KB, created by
Jonathan Druart
on 2022-08-01 10:50:13 UTC
(
hide
)
Description:
Bug 30468: Restore 'set -e' and remove echos
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2022-08-01 10:50:13 UTC
Size:
2.44 KB
patch
obsolete
>From fb32dfdeb4e0d743ca009a4d4b32e51122a4bad4 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Mon, 1 Aug 2022 12:31:21 +0200 >Subject: [PATCH] Bug 30468: Restore 'set -e' and remove echos > >--- > debian/scripts/koha-mysql | 24 +++++++++++------------- > 1 file changed, 11 insertions(+), 13 deletions(-) > >diff --git a/debian/scripts/koha-mysql b/debian/scripts/koha-mysql >index 959812d1b03..89fa3b69e3b 100755 >--- a/debian/scripts/koha-mysql >+++ b/debian/scripts/koha-mysql >@@ -17,6 +17,7 @@ > # You should have received a copy of the GNU General Public License > # along with this program. If not, see <http://www.gnu.org/licenses/>. > >+set -e > umask 0077 > > # include helper functions >@@ -48,20 +49,17 @@ is_instance "$name" || ( usage; die "Unknown instance '$name'" ) > shift # remove instance name from argument list. > kohaconfig="/etc/koha/sites/$name/koha-conf.xml" > >-mysqlhost="$( xmlstarlet sel -t -v 'yazgfs/config/hostname' $kohaconfig )" || die "hostname missing from $kohaconfig" >-mysqldb="$( xmlstarlet sel -t -v 'yazgfs/config/database' $kohaconfig )" || die "database missing from $kohaconfig" >-mysqluser="$( xmlstarlet sel -t -v 'yazgfs/config/user' $kohaconfig )" || die "user missing from $kohaconfig" >-mysqlpass="$( xmlstarlet sel -t -v 'yazgfs/config/pass' $kohaconfig )" || die "pass missing from $kohaconfig" >+mysqlhost="$( xmlstarlet sel -t -v 'yazgfs/config/hostname' $kohaconfig )" >+mysqldb="$( xmlstarlet sel -t -v 'yazgfs/config/database' $kohaconfig )" >+mysqluser="$( xmlstarlet sel -t -v 'yazgfs/config/user' $kohaconfig )" >+mysqlpass="$( xmlstarlet sel -t -v 'yazgfs/config/pass' $kohaconfig )" > >-mysqltz="$( xmlstarlet sel -t -v 'yazgfs/config/timezone' $kohaconfig )" >-if [ $? -eq 0 ] >+mysqltz="$( xmlstarlet sel -t -v 'yazgfs/config/timezone' $kohaconfig || true )" >+if [ "$mysqltz" != "" ] > then >- echo "Using time zone $mysqltz" >- mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" --init-command="SET time_zone = '$mysqltz'" \ >- "$mysqldb" "${@}" >+ mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" --init-command="SET time_zone='$mysqltz'" \ >+ "$mysqldb" "${@}" > else >- echo "No time zone set for Koha, using database time zone." >- mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" \ >- "$mysqldb" "${@}" >+ mysql --host="$mysqlhost" --user="$mysqluser" --password="$mysqlpass" \ >+ "$mysqldb" "${@}" > fi >- >-- >2.25.1
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 30468
:
132996
|
132998
|
132999
|
133000
|
136746
|
138457
|
138458