https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=44194

            Bug ID: 44194
           Summary: koha-dump --quiet exits 1 after every successful dump
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Command-line Utilities
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]
  Target Milestone: ---

The last line of dump_instance in debian/scripts/koha-dump is

  [ "$quiet" = "no" ] && echo "Done."

With --quiet the test is false, so the line, and with it the function, returns
1; the script runs under set -e and exits 1. The dump itself is complete.

Any cron job or monitoring that runs koha-dump --quiet and checks the exit
status therefore sees a failure after every good backup, which teaches people
to ignore the alert.

To reproduce (main):
1. sudo koha-dump --quiet kohadev ; echo $?
2. Prints 1. The .sql.gz and .tar.gz in /var/spool/koha/kohadev are complete.
3. sudo koha-dump kohadev ; echo $?  prints Done. and 0.

Expected: 0 after a successful dump, with or without --quiet.

Reproduced on main (6ff8078) and on Koha 26.05.02.

-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to