Re:A cron pitfall that will probably snare you at least once...
by hollerith on Monday June 27, 2011 @12:49PM
(#2701953)
>This isn't a Unix pitfall, it's a Debian pitfall.
And that is an example of why I do not run Debian any more: (1) it assumes that I have nothing better to do than learn all of the details of the Debian system and (2) as soon as some complication like this dots-in-filenames thing makes it into stable, it is very difficult to remove because most Debian maintainers consider it-might-break-existing-code a winning argument.
Re:A cron pitfall that will probably snare you at least once...
by barrkel on Monday June 27, 2011 @09:27PM
(#2703660)
"It might break existing code" is usually a winning argument. It takes a very strong opposing argument to beat it. If you don't believe in this, I don't want to use any of your code.
Re:A cron pitfall that will probably snare you at least once...
by hollerith on Tuesday June 28, 2011 @08:26PM
(#2707938)
I can see how server software needs to be more conservative about making changes. I'm glad I am not using server software anymore for my personal software environment.
Re:A cron pitfall that will probably snare you at least once...
by pyre on Monday June 27, 2011 @11:41PM
(#2703976)
On the other hand, CentOS 5 has run-parts, but it doesn't have a --help option or a manpage. The Debian one does.
Re:A cron pitfall that will probably snare you at least once...
by ramidarigaz on Monday June 27, 2011 @06:39PM
(#2703269)
What do you use instead?
Re:A cron pitfall that will probably snare you at least once...
by Nick_C on Monday June 27, 2011 @10:51PM
(#2703834)
Slackware. As usual, takes the good bits out of both RedHat's and Debian's run-parts. It allows .{whatever} but ignores obvious, well-known suffixes like .bak etc.
From man run-parts: run-parts automatically skips files with certain suffixes that are generally associated with backup or extra files. Any file that ends in one of these will be silently ignored: ~ ^ , .bak .new .rpmsave, .rpmorig .rpmnew .swp
Re:A cron pitfall that will probably snare you at least once...
by maratd on Monday June 27, 2011 @08:48PM
(#2703574)
CentOS/Redhat or you could go full Unix with FreeBSD. Lots of other options too.
Re:A cron pitfall that will probably snare you at least once...
by hollerith on Tuesday June 28, 2011 @08:19PM
(#2707923)
I switched to OS X in 2009. At the point I had been running Linux for 12 years, and GNU and Emacs on proprietary Unix for the 5 years before that.
Re:A cron pitfall that will probably snare you at least once...
by hollerith on Tuesday June 28, 2011 @08:16PM
(#2707918)
I was a Linux user since 1997, but switched to OS X in 2009.
Re:A cron pitfall that will probably snare you at least once...
by tedunangst on Monday June 27, 2011 @12:12PM
(#2701825)
Thank you for that clarification. I've been running shell scripts named .sh all the time without trouble. Of course, I run them from crontab. I'd never even heard of this /etc/cron.* thing.
Re:A cron pitfall that will probably snare you at least once...
by sliverstorm on Monday June 27, 2011 @02:46PM
(#2702467)
It's somewhat nifty, I suspect it originated as a way to allow new packages to easily add jobs to cron if they need
Re:A cron pitfall that will probably snare you at least once...
by gwern on Monday June 27, 2011 @08:36PM
(#2703547)
That's what Krafft says in _The Debian System_, actually - that it would be a real mess if new packages all had to edit the same crontab to install and deinstall themselves, but a directory-based system was very clean.
This isn't a Unix pitfall, it's a Debian pitfall. Further, it's not inherent to cron, but to the /etc/cron.{hourly,daily,weekly,monthly} concept as implemented by Debian.
Scripts in these directories are run via /usr/bin/run-parts, which is invoked via /etc/crontab. It is Debian's run-parts that imposes the naming restriction. Red Hat's run-parts doesn't have this restriction (go take a look, it's a shell script).