backup-manager no longer verbose

With a recent upgrade to version 0.7.9, I found that backup-manager was no longer properly verbose. It looks like being due to a bug in the code, corrected by provided patch file.

For more info, see bug report #248: http://bugzilla.backup-manager.org/show_bug.cgi?id=248

To patch backup-manager, proceed as follow:

  • copy, paste & save below patch-content into ‘/usr/share/backup-manager/logger.diff’ file
  • patch logger.sh file by running:
    patch /usr/share/backup-manager/logger.sh /usr/share/backup-manager/logger.diff

That’s it!

Verbose option should work properly by now.

sources

Patch (.diff file content)

55a56,58
> 		#when true, send stuff to syslog, otherwise simply print it if necessary
> 		bm_via_syslog="false"
>
60c63
<
---
>
64a68,70
>             if [[ "$BM_LOGGER_LEVEL" == "debug" ]]; then
>             	bm_via_syslog="true"
>             fi
67a74,77
>             if [[ "$BM_LOGGER_LEVEL" == "debug" ]]\
>                || [[ "$BM_LOGGER_LEVEL" == "info" ]]; then
>             	bm_via_syslog="true"
>             fi
70a81,90
>             if [[ "$BM_LOGGER_LEVEL" == "debug" ]]\
>                || [[ "$BM_LOGGER_LEVEL" == "info" ]]\
>                || [[ "$BM_LOGGER_LEVEL" == "warning" ]]; then
>             	bm_via_syslog="true"
>             fi
>         ;;
>         "error")
>         		# Errors are always sent to syslog & printed
>             bm_log_switch="true"
>             bm_via_syslog="true"
100c120,122
<         syslog $bm_log_level "${log_buffer}${message}"
---
>         if [[ "$bm_via_syslog" == "true" ]]; then
> 	        syslog $bm_log_level "${log_buffer}${message}"
> 	      fi
115,118c137,138
<     if [[ "$BM_LOGGER_LEVEL" == "debug" ]]; then
<         bm_log_level="debug"
<         log "DEBUG: $@"
<     fi
---
>     bm_log_level="debug"
>     log "DEBUG: $@"
123,127c143,144
<     if [[ "$BM_LOGGER_LEVEL" == "debug" ]]\
<     || [[ "$BM_LOGGER_LEVEL" == "info" ]]; then
<         bm_log_level="info"
<         log "$@"
<     fi
---
>     bm_log_level="info"
>     log "$@"
132,137c149,150
<     if [[ "$BM_LOGGER_LEVEL" == "debug" ]]\
<     || [[ "$BM_LOGGER_LEVEL" == "info" ]]\
<     || [[ "$BM_LOGGER_LEVEL" == "warning" ]]; then
<         bm_log_level="warning"
<         log "$@"
<     fi
---
>    bm_log_level="warning"
>    log "$@"

Post a Comment

Your email is never published nor shared. You're allow to say what you want...