Bug 4740 - Disable backup scripts in 'run-parts'
Disable backup scripts in 'run-parts'
Status: CLOSED NEXTRELEASE
Product: Red Hat Linux
Classification: Retired
Component: crontabs (Show other bugs)
6.0
All Linux
medium Severity medium
: ---
: ---
Assigned To: Crutcher Dunnavant
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 1999-08-27 03:11 EDT by jaro
Modified: 2008-05-01 11:37 EDT (History)
0 users

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2001-04-10 18:01:10 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description jaro 1999-08-27 03:11:23 EDT
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
Comment 1 Jeff Johnson 1999-08-27 10:07:59 EDT
Fixed in crontabs-1.7-7. Thanks for noticing.

Note You need to log in before you can comment on or make changes to this bug.