Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 237200 - sys-process/cronbase: Proposed Patch to prevent emacs backup files from running in /etc/cron.* folders
Summary: sys-process/cronbase: Proposed Patch to prevent emacs backup files from runni...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Cron Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: 169449
  Show dependency tree
 
Reported: 2008-09-09 16:52 UTC by Steven Green
Modified: 2015-07-21 09:43 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch to ignore emacs backup files from being run by cron (cronbase.patch,430 bytes, patch)
2008-09-09 16:57 UTC, Steven Green
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Green 2008-09-09 16:52:28 UTC
When you edit a file with emacs the default behaviour is to make a backup file of the same name but with a tilda on the end, eg. myfile~

I have frquently been caught out after editing a file in /etc/cron.daily and then find that the old backup is run as well as the newly edited one.

A simple fix is to add:
GLOBIGNORE="*~" in /usr/sbin/run-crons.


--- /usr/portage/sys-process/cronbase/files/run-crons-0.3.2     2007-06-24 21:40:42.000000000 +0100
+++ /usr/sbin/run-crons 2008-09-09 17:12:01.000000000 +0100
@@ -91,6 +91,7 @@
                touch ${LOCKDIR}/cron.$BASE

                set +e
+               GLOBIGNORE="*~"
                for SCRIPT in $CRONDIR/* ; do
                        if [[ -x $SCRIPT && ! -d $SCRIPT ]]; then
                                $SCRIPT



Reproducible: Always
Comment 1 Steven Green 2008-09-09 16:57:58 UTC
Created attachment 165038 [details, diff]
Patch to ignore emacs backup files from being run by cron
Comment 2 Wormo (RETIRED) gentoo-dev 2008-09-09 20:08:37 UTC
Thanks for the patch, assigning to maintainers.
Comment 3 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2008-10-08 10:03:36 UTC
this looks so trivial, i am inclined to include it.
cron-bugs: objections?
Comment 4 Thilo Bangert (RETIRED) (RETIRED) gentoo-dev 2009-04-14 06:15:17 UTC
included in cronbase-0.3.3.
thanks...
Comment 5 Dmitri Bogomolov 2011-08-18 10:14:36 UTC
This patch introduced bug 280261.