Bug 1538603
| Summary: | default backup-manager cron job problem with commented copies of configuration file lines | ||
|---|---|---|---|
| Product: | [Fedora] Fedora EPEL | Reporter: | Boschkundendienst <boschkundendienst> |
| Component: | backup-manager | Assignee: | Orphan Owner <extras-orphan> |
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
| Severity: | low | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | epel7 | CC: | guillaume |
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | If docs needed, set a value | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2024-07-09 02:16:39 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
This package has changed maintainer in Fedora. Reassigning to the new maintainer of this component. EPEL 7 entered end-of-life (EOL) status on 2024-06-30.\n\nEPEL 7 is no longer maintained, which means that it\nwill not receive any further security or bug fix updates.\n As a result we are closing this bug. |
Description of problem: backup-manager installs the following script as cron job /etc/cron.daily/backup-manager.cron which is executed daily. This script evaluates the variable BM_DAILY_CRON from /etc/backup-manager.conf If /etc/backup-manager.conf contains multiple lines that contain the string 'BM_DAILY_CRON' (eg. you created a copy of a configuration line and commented it out by preceding it with '#') the grep command in the above script will pickup both matching lines and when it tries to evaluate the variable from the output of the grep command it fails. This causes backup-manager not to run daily as expected. Version-Release number of selected component (if applicable): 0.7.10 13.el7 How reproducible: always Steps to Reproduce: 1. install backup-manager from epel. 2. open the file /etc/backup-manager.conf with your favourite editor and change the lines # RPM-specific : Enabled daily cron export BM_DAILY_CRON="false" to # RPM-specific : Enabled daily cron #export BM_DAILY_CRON="false" export BM_DAILY_CRON="true" Your backup will never run because the evaluation of the variable BM_DAILY_CRON will fail due to grep is finding 2 matching lines. Actual results: /etc/cron.daily/backup-manager.cron: line 10: [: =: unary operator expected [backup-manager] Daily cron is disabled Expected results: ${BM_PATH} -v should be executed which is usually /usr/sbin/backup-manager -v Additional info: The problem can be solved by changing the line eval $(grep BM_DAILY_CRON /etc/backup-manager.conf) in /etc/cron.daily/backup-manager.cron to eval $(grep BM_DAILY_CRON /etc/backup-manager.conf | grep -v ^#) or use a regex that ignores comment lines to evaluate the variable.