Bugzilla – Attachment 75227 Details for
Bug 20745
indexing/searching not active at end of installation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20745: koha-zebra doesn't return the correct error codes
Bug-20745-koha-zebra-doesnt-return-the-correct-err.patch (text/plain), 2.87 KB, created by
Tomás Cohen Arazi (tcohen)
on 2018-05-10 15:44:24 UTC
(
hide
)
Description:
Bug 20745: koha-zebra doesn't return the correct error codes
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2018-05-10 15:44:24 UTC
Size:
2.87 KB
patch
obsolete
>From e015d93dca1501eda7479b55c0c6236ae98899d5 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Thu, 10 May 2018 12:37:53 -0300 >Subject: [PATCH] Bug 20745: koha-zebra doesn't return the correct error codes > >This patch makes koha-zebra return 0 (or 1) even when verbose mode is >off. This made koha-zebra --start always return a failure even when the >daemon was correctly launched. > >To test: >- Have Zebra running for kohadev instance on your KohaDevBox >- Run: > $ sudo koha-zebra --stop kohadev && echo yay || echo doh >=> FAIL: 'doh' is printed >- Run: > $ sudo koha-zebra --start kohadev e&& echo yay || echo doh >=> FAIL: 'doh' is printed as well >- Apply this patch >- Run: > $ sudo perl misc4dev/cp_debian_files.pl > $ sudo koha-zebra --stop kohadev && echo yay || echo doh >=> SUCCESS: 'yay' is printed >- Run: > $ sudo koha-zebra --start kohadev e&& echo yay || echo doh >=> SUCCESS: 'yay' is printed >- Sign off :-D > >Sponsored-by: ByWater Solutions >--- > debian/scripts/koha-zebra | 22 ++++++++++++++-------- > 1 file changed, 14 insertions(+), 8 deletions(-) > >diff --git a/debian/scripts/koha-zebra b/debian/scripts/koha-zebra >index 944e2e12a1..f6d2268c7e 100755 >--- a/debian/scripts/koha-zebra >+++ b/debian/scripts/koha-zebra >@@ -82,16 +82,18 @@ start_zebra() > log_daemon_msg "Starting Koha Zebra daemon for ${name}" > > if daemon $DAEMONOPTS -- $ZEBRA_DAEMON $ZEBRA_PARAMS; then >- [ "$verbose" != "no" ] && \ >- log_end_msg 0 >+ ([ "$verbose" != "no" ] && \ >+ log_end_msg 0) || return 0 > else >- [ "$verbose" != "no" ] && \ >- log_end_msg 1 >+ ([ "$verbose" != "no" ] && \ >+ log_end_msg 1) || return 1 > fi > else > if [ "$verbose" != "no" ]; then > log_daemon_msg "Error: Zebra already running for ${name}" > log_end_msg 1 >+ else >+ return 1 > fi > fi > } >@@ -115,16 +117,18 @@ stop_zebra() > log_daemon_msg "Stopping Koha Zebra daemon for ${name}" > > if daemon $DAEMONOPTS --stop -- $ZEBRA_DAEMON $ZEBRA_PARAMS; then >- [ "$verbose" != "no" ] && \ >- log_end_msg 0 >+ ([ "$verbose" != "no" ] && \ >+ log_end_msg 0) || return 0 > else >- [ "$verbose" != "no" ] && \ >- log_end_msg 1 >+ ([ "$verbose" != "no" ] && \ >+ log_end_msg 1) || return 1 > fi > else > if [ "$verbose" != "no" ]; then > log_daemon_msg "Error: Zebra not running for ${name}" > log_end_msg 1 >+ else >+ return 1 > fi > fi > } >@@ -142,6 +146,8 @@ restart_zebra() > if [ "$verbose" != "no" ]; then > log_daemon_msg "Error: Zebra not running for ${name}" > log_end_msg 1 >+ else >+ return 1 > fi > fi > } >-- >2.17.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 20745
:
75217
|
75227
|
75231
|
75233