Bug 4740
| Summary: | Disable backup scripts in 'run-parts' | ||
|---|---|---|---|
| Product: | [Retired] Red Hat Linux | Reporter: | jaro |
| Component: | crontabs | Assignee: | Crutcher Dunnavant <crutcher> |
| Status: | CLOSED NEXTRELEASE | QA Contact: | |
| Severity: | medium | Docs Contact: | |
| Priority: | medium | ||
| Version: | 6.0 | ||
| Target Milestone: | --- | ||
| Target Release: | --- | ||
| Hardware: | All | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2001-04-10 22:01:10 UTC | Type: | --- |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Fixed in crontabs-1.7-7. Thanks for noticing. |
I propose a slight modification to the run-parts script, to disable running backup scripts in the /etc/cron.* directories. This is accomplished with the following version: #!/bin/bash # run-parts - concept taken from Debian # keep going when something fails set +e if [ $# -lt 1 ]; then echo "Usage: run-parts <dir>" exit 1 fi if [ ! -d $1 ]; then echo "Not a directory: $1" exit 1 fi for i in $1/*[^~] ; do # Don't run shell backups (ending to ~) [ -d $i ] && continue # Don't run [KS]??foo.{rpmsave,rpmorig,rpmnew} scripts [ "${i%.rpmsave}" != "${i}" ] && continue [ "${i%.rpmorig}" != "${i}" ] && continue [ "${i%.rpmnew}" != "${i}" ] && continue if [ -x $i ]; then $i fi done exit 0