Bugzilla – Attachment 23700 Details for
Bug 10735
koha-dump not working
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10735 - prevent script aborting if backupdir undefined
Bug-10735---prevent-script-aborting-if-backupdir-u.patch (text/plain), 1.74 KB, created by
Tomás Cohen Arazi (tcohen)
on 2013-12-19 18:03:54 UTC
(
hide
)
Description:
Bug 10735 - prevent script aborting if backupdir undefined
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2013-12-19 18:03:54 UTC
Size:
1.74 KB
patch
obsolete
>From 03e6a6709dbec68f75b0b71038ef5ca9dbbc22f8 Mon Sep 17 00:00:00 2001 >From: Robin Sheat <robin@catalyst.net.nz> >Date: Tue, 19 Nov 2013 15:26:02 +1300 >Subject: [PATCH] Bug 10735 - prevent script aborting if backupdir undefined > >Older versions of Koha didn't have <backupdir>...</backupdir> defined in >koha-conf.xml. The koha-dump script is aware of this, and checks to see >if it's there. However, if it's not, xmlstarlet returns a non-0 error >code which causes the script to abort due to running under set -e. > >Test plan: > * Remove backupdir from koha-conf.xml > * Run koha-dump, notice that it doesn't do backups > * Apply patch > * Run koha-dump again, notice that it does do backups > >Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com> >The fallback method works as described. It might be made more robust >like checking for dir existence (thinking of older instances upgrades). >But it certaintly belongs to another bug report. >--- > debian/scripts/koha-dump | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/debian/scripts/koha-dump b/debian/scripts/koha-dump >index 2fe9edd..02aeb93 100755 >--- a/debian/scripts/koha-dump >+++ b/debian/scripts/koha-dump >@@ -44,7 +44,7 @@ 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 )" >-backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' $kohaconfig )" >+backupdir="$( xmlstarlet sel -t -v 'yazgfs/config/backupdir' $kohaconfig || true )" > [ -z "$backupdir" ] && backupdir="/var/spool/koha/$name" > dbdump="$backupdir/$name-$date.sql.gz" > echo "* DB to $dbdump" >-- >1.8.3.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 10735
:
23010
|
23700
|
23784