On 7/6/07, Steve Long <[EMAIL PROTECTED]> wrote:
Ryan Reich wrote: <snip useful discussion that went over my head> > > If there's interest in incorporating this, I wouldn't mind testing my > idea. Once I get past the initial resistance to doing anything at > all, it's probably two minutes' compilation time plus two more writing > the config files to set up. > I think I should point out that comments like that really get people's backs up; if it's so quick and easy why didn't you implement it first and then ask for comments on a working project? If you only wanted discussion then cool, you got it ;)Please do post a follow up with a link to the working code. (BTW my 5 minute projects always take weeks.. ;)
I don't know if I got anyone else's back up with this, but you got mine up with your letter :) So I wrote an ebuild for incron (though I notice that there's an extremely minimal one pending on bugs.gentoo.org). It includes, in addition to the actual ebuild file, a boot script, an incrontab similar to the one I conceptualized in one of my earlier letters, and a little script that handles files in /etc/cron.{hourly,...}. I've tested it on my machine (indeed, I'm running it now) and it does work. Basically, the incrontab (called "fcrontabs" and which goes in /etc/incron.d) runs my little script to generate a one-line fcrontab which it puts in /etc/cron, whenever it sees something change in one of the cron.timely directories; the one-liner just runs the script which changed. It also makes check_system_crontabs the responsibility of incrond. The net result is that adding anything to any /etc/cron.timely/ results in a periodic fcron job, like @ 1d makewhatis -u being added to the fcrontab for "systab" immediately. The contents of /etc/crontab and /etc/fcrontab are redundant under this scheme and the files should be emptied if this is used. I've tarred and bzipped the whole ebuild directory and attached it; it's only four kilobytes so I hope no one minds (this letter is probably longer). I don't know where the correct forum to submit this sort of thing for comment is, so if this isn't it I'd be happy to take it somewhere else. But I thought anyone following this discussion would like to see it here. -- Ryan Reich
incron-ebuild.tar.bz2
Description: BZip2 compressed data