Re: cron(8) improvement

2013-11-20 Thread Thomas K.
On Wed, Nov 06, 2013 at 10:57:12AM +0200, Volodymyr Kostyrko wrote: Shouldn't we encourage packages to use periodic(8) when possible? Yes but our default periodic configuration in /etc/crontab is only configured to be as granular as daily. If this is something that should run hourly or

Re: cron(8) improvement

2013-11-14 Thread dt71
Adrian Chadd wrote, On 11/10/2013 01:18: I'm kinda fed up installing packages that don't enable themselves. There should be no package that needs activation, that is if you want a desktop computer, not a server. 'pkg install xorg' is not enough to get a working xorg. You have to enable hal

Re: cron(8) improvement

2013-11-11 Thread Stefan Esser
Am 10.11.2013 18:23, schrieb Warren Block: On Sun, 10 Nov 2013, Philipp Ost wrote: Warren Block schrieb: [...] Given the above scenario, would it be acceptable to set the entry in rc.conf, $portname_cron=YES, to $portname_cron=NO without touching the modified files and inform the user about

Re: cron(8) improvement

2013-11-10 Thread George Mitchell
On 11/09/13 21:23, Allan Jude wrote: On 2013-11-09 21:13, Adrian Chadd wrote: On 9 November 2013 17:58, Allan Jude free...@allanjude.com wrote: Well, if the rc.conf config is specific to the daemon being installed by the package, then the existing /etc/rc.conf.d/ system works fine, it just

Re: cron(8) improvement

2013-11-10 Thread Allan Jude
On 2013-11-10 09:04, George Mitchell wrote: On 11/09/13 21:23, Allan Jude wrote: On 2013-11-09 21:13, Adrian Chadd wrote: On 9 November 2013 17:58, Allan Jude free...@allanjude.com wrote: Well, if the rc.conf config is specific to the daemon being installed by the package, then the existing

Re: cron(8) improvement

2013-11-10 Thread Warren Block
On Sun, 10 Nov 2013, Daniel O'Connor wrote: On 10 Nov 2013, at 24:24, Matthew Seaman matt...@freebsd.org wrote: 2) Should ports / packages populate these cron.d directories? This is a much more interesting question. Effectively its asking if a port / package should provide

Re: cron(8) improvement

2013-11-10 Thread Allan Jude
On 2013-11-10 11:21, Warren Block wrote: On Sun, 10 Nov 2013, Daniel O'Connor wrote: On 10 Nov 2013, at 24:24, Matthew Seaman matt...@freebsd.org wrote: 2) Should ports / packages populate these cron.d directories? This is a much more interesting question. Effectively its asking

Re: cron(8) improvement

2013-11-10 Thread Philipp Ost
Warren Block schrieb: [...] ie either the file is named such that it is ignored by cron (preferable IMO) or the entries in them are commented out. Why not just use an additional entry in rc.conf? rsnapshot_cron=YES (If there is a /usr/local/etc/cron.d/rsnapshot, add it to cron on

Re: cron(8) improvement

2013-11-10 Thread Warren Block
On Sun, 10 Nov 2013, Philipp Ost wrote: Warren Block schrieb: [...] ie either the file is named such that it is ignored by cron (preferable IMO) or the entries in them are commented out. Why not just use an additional entry in rc.conf? rsnapshot_cron=YES (If there is a

Re: cron(8) improvement

2013-11-10 Thread Jia-Shiun Li
On Sun, Nov 10, 2013 at 10:13 AM, Adrian Chadd adr...@freebsd.org wrote: The point I'm making is this: * when populating rc.conf.d/, don't just do 'cp' in a post-install script * when populating the cron daemon entries in rc.cron.d, don't just 'cp' in a post-install script. sounds like we

Re: cron(8) improvement

2013-11-09 Thread Matthew Seaman
On 08/11/2013 04:51, Allan Jude wrote: My use case is puppet etc, not ports/packages, so I'll leave the policy about packages up to portsmgr@, I just want a less sloppy way to manage crontabs with my orchestration system (and feature parity with Linux) There's two questions here: 1) Should

Re: cron(8) improvement

2013-11-09 Thread Daniel O'Connor
On 10 Nov 2013, at 24:24, Matthew Seaman matt...@freebsd.org wrote: 2) Should ports / packages populate these cron.d directories? This is a much more interesting question. Effectively its asking if a port / package should provide some level of automatic configuration

Re: cron(8) improvement

2013-11-09 Thread Adrian Chadd
On 9 November 2013 16:05, Daniel O'Connor docon...@gsoft.com.au wrote: On 10 Nov 2013, at 24:24, Matthew Seaman matt...@freebsd.org wrote: 2) Should ports / packages populate these cron.d directories? This is a much more interesting question. Effectively its asking if a port

Re: cron(8) improvement

2013-11-09 Thread Daniel O'Connor
On 10 Nov 2013, at 10:48, Adrian Chadd adr...@freebsd.org wrote: ie either the file is named such that it is ignored by cron (preferable IMO) or the entries in them are commented out. I want the opposite. I'm kinda fed up installing packages that don't enable themselves. 'pkg install

Re: cron(8) improvement

2013-11-09 Thread Allan Jude
On 2013-11-09 19:18, Adrian Chadd wrote: On 9 November 2013 16:05, Daniel O'Connor docon...@gsoft.com.au wrote: On 10 Nov 2013, at 24:24, Matthew Seaman matt...@freebsd.org wrote: 2) Should ports / packages populate these cron.d directories? This is a much more interesting question.

Re: cron(8) improvement

2013-11-09 Thread Adrian Chadd
On 9 November 2013 16:28, Allan Jude free...@allanjude.com wrote: Well, what about making these extra directories optional then? packages install the crontab entries, but crond ignores them unless you add: cron_flags=--scandir /etc/cron.d --scandir /usr/local/etc/cron.d or something to

Re: cron(8) improvement

2013-11-09 Thread Allan Jude
On 2013-11-09 20:05, Adrian Chadd wrote: On 9 November 2013 16:28, Allan Jude free...@allanjude.com wrote: Well, what about making these extra directories optional then? packages install the crontab entries, but crond ignores them unless you add: cron_flags=--scandir /etc/cron.d --scandir

Re: cron(8) improvement

2013-11-09 Thread Adrian Chadd
On 9 November 2013 17:40, Allan Jude free...@allanjude.com wrote: On 2013-11-09 20:05, Adrian Chadd wrote: On 9 November 2013 16:28, Allan Jude free...@allanjude.com wrote: Well, what about making these extra directories optional then? packages install the crontab entries, but crond ignores

Re: cron(8) improvement

2013-11-09 Thread Allan Jude
On 2013-11-09 20:55, Adrian Chadd wrote: On 9 November 2013 17:40, Allan Jude free...@allanjude.com wrote: On 2013-11-09 20:05, Adrian Chadd wrote: On 9 November 2013 16:28, Allan Jude free...@allanjude.com wrote: Well, what about making these extra directories optional then? packages

Re: cron(8) improvement

2013-11-09 Thread Adrian Chadd
On 9 November 2013 17:58, Allan Jude free...@allanjude.com wrote: Well, if the rc.conf config is specific to the daemon being installed by the package, then the existing /etc/rc.conf.d/ system works fine, it just falls down a little on xorg configuring hald, unless you just make the xorg

Re: cron(8) improvement

2013-11-09 Thread Allan Jude
On 2013-11-09 21:13, Adrian Chadd wrote: On 9 November 2013 17:58, Allan Jude free...@allanjude.com wrote: Well, if the rc.conf config is specific to the daemon being installed by the package, then the existing /etc/rc.conf.d/ system works fine, it just falls down a little on xorg configuring

Re: cron(8) improvement

2013-11-08 Thread Erik Cederstrand
Den 07/11/2013 kl. 13.11 skrev Kimmo Paasiala kpaas...@gmail.com: Snippets installed by ports should be disabled by default and enabled only selectively by variables in rc.conf(5) or some other configuration file to mirror what periodic(8) is doing now. This is an absolute must because

Re: cron(8) improvement

2013-11-07 Thread Kimmo Paasiala
On Thu, Nov 7, 2013 at 6:43 AM, Lyndon Nerenberg lyn...@orthanc.ca wrote: On Nov 6, 2013, at 7:49 PM, Kimmo Paasiala kpaas...@gmail.com wrote: What's wrong with using the existing tools for achieving the same effect? Periodic can be adapted to do exactly what you're describing as noted above

Re: cron(8) improvement

2013-11-07 Thread Allan Jude
On 2013-11-07 07:11, Kimmo Paasiala wrote: On Thu, Nov 7, 2013 at 6:43 AM, Lyndon Nerenberg lyn...@orthanc.ca wrote: On Nov 6, 2013, at 7:49 PM, Kimmo Paasiala kpaas...@gmail.com wrote: What's wrong with using the existing tools for achieving the same effect? Periodic can be adapted to do

Re: cron(8) improvement

2013-11-07 Thread Lyndon Nerenberg
On Nov 7, 2013, at 9:13, Allan Jude free...@allanjude.com wrote: Right. The best way to handle this is likely to have the ports install the example cron to ${PREFIX}/share/portname/ or wherever else they normally put examples, with instructions in the pkg-message on how to enable the cron.

Re: cron(8) improvement

2013-11-07 Thread Allan Jude
On 2013-11-07 22:39, Lyndon Nerenberg wrote: On Nov 7, 2013, at 9:13, Allan Jude free...@allanjude.com wrote: Right. The best way to handle this is likely to have the ports install the example cron to ${PREFIX}/share/portname/ or wherever else they normally put examples, with instructions in

Re: cron(8) improvement

2013-11-07 Thread Lyndon Nerenberg
On Nov 7, 2013, at 19:41, Allan Jude free...@allanjude.com wrote: it really depends on the port and what the cron is doing. Why? Can you give some specific examples? ___ freebsd-current@freebsd.org mailing list

Re: cron(8) improvement

2013-11-07 Thread Kimmo Paasiala
On Fri, Nov 8, 2013 at 5:42 AM, Lyndon Nerenberg lyn...@orthanc.ca wrote: On Nov 7, 2013, at 19:41, Allan Jude free...@allanjude.com wrote: it really depends on the port and what the cron is doing. Why? Can you give some specific examples? I don't like the idea of having untracked files

Re: cron(8) improvement

2013-11-07 Thread Allan Jude
On 2013-11-07 22:46, Kimmo Paasiala wrote: On Fri, Nov 8, 2013 at 5:42 AM, Lyndon Nerenberg lyn...@orthanc.ca wrote: On Nov 7, 2013, at 19:41, Allan Jude free...@allanjude.com wrote: it really depends on the port and what the cron is doing. Why? Can you give some specific examples? I don't

Re: cron(8) improvement

2013-11-07 Thread Lyndon Nerenberg
On Nov 7, 2013, at 19:46, Kimmo Paasiala kpaas...@gmail.com wrote: I don't like the idea of having untracked files installed by the rc(8) script. Why not install the cron.d snippet by default but leave everything in it commented out with instructions at the beginning to uncomment the

Re: cron(8) improvement

2013-11-07 Thread Allan Jude
On 2013-11-07 23:48, Lyndon Nerenberg wrote: On Nov 7, 2013, at 19:46, Kimmo Paasiala kpaas...@gmail.com wrote: I don't like the idea of having untracked files installed by the rc(8) script. Why not install the cron.d snippet by default but leave everything in it commented out with

Re: cron(8) improvement

2013-11-06 Thread Volodymyr Kostyrko
05.11.2013 20:21, Mark Felder wrote: On Tue, Nov 5, 2013, at 11:37, Nikolai Lifanov wrote: On 11/05/13 12:31, Allan Jude wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what linux cron does, where there is a

Re: cron(8) improvement

2013-11-06 Thread Mark Felder
On Wed, Nov 6, 2013, at 2:57, Volodymyr Kostyrko wrote: 05.11.2013 20:21, Mark Felder wrote: On Tue, Nov 5, 2013, at 11:37, Nikolai Lifanov wrote: On 11/05/13 12:31, Allan Jude wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget.

Re: cron(8) improvement

2013-11-06 Thread Tim Kientzle
On Nov 5, 2013, at 9:31 AM, Allan Jude free...@allanjude.com wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what linux cron does, where there is a directory /etc/cron.d/ that packages and add files to to

Re: cron(8) improvement

2013-11-06 Thread Lyndon Nerenberg
Support for a cron.d directory is a tool that can be used in many ways. I have used cron.d on other UNIXen, and for package-installed cron jobs I find it significantly friendlier, in that it makes these jobs easily identifiable to the sysadmin. As we do it now, the per-user crontabs are

Re: cron(8) improvement

2013-11-06 Thread Mark Felder
On Wed, Nov 6, 2013, at 18:21, Tim Kientzle wrote: On Nov 5, 2013, at 9:31 AM, Allan Jude free...@allanjude.com wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what linux cron does, where there is a

Re: cron(8) improvement

2013-11-06 Thread Allan Jude
On 2013-11-06 20:49, Mark Felder wrote: On Wed, Nov 6, 2013, at 18:21, Tim Kientzle wrote: On Nov 5, 2013, at 9:31 AM, Allan Jude free...@allanjude.com wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what

Re: cron(8) improvement

2013-11-06 Thread Kimmo Paasiala
On Thu, Nov 7, 2013 at 4:27 AM, Allan Jude free...@allanjude.com wrote: On 2013-11-06 20:49, Mark Felder wrote: On Wed, Nov 6, 2013, at 18:21, Tim Kientzle wrote: On Nov 5, 2013, at 9:31 AM, Allan Jude free...@allanjude.com wrote: This came up in discussion on IRC and I thought I should

Re: cron(8) improvement

2013-11-06 Thread Allan Jude
On 2013-11-06 22:49, Kimmo Paasiala wrote: On Thu, Nov 7, 2013 at 4:27 AM, Allan Jude free...@allanjude.com wrote: On 2013-11-06 20:49, Mark Felder wrote: On Wed, Nov 6, 2013, at 18:21, Tim Kientzle wrote: On Nov 5, 2013, at 9:31 AM, Allan Jude free...@allanjude.com wrote: This came up in

Re: cron(8) improvement

2013-11-06 Thread Lyndon Nerenberg
On Nov 6, 2013, at 7:49 PM, Kimmo Paasiala kpaas...@gmail.com wrote: What's wrong with using the existing tools for achieving the same effect? Periodic can be adapted to do exactly what you're describing as noted above by adding an hourly (even minutely? :D ) periodic run. Periodic is geared

cron(8) improvement

2013-11-05 Thread Allan Jude
This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what linux cron does, where there is a directory /etc/cron.d/ that packages and add files to to create crontabs. Making FreeBSD's cron (Vixie Cron) include /etc/cron.d/

Re: cron(8) improvement

2013-11-05 Thread Nikolai Lifanov
On 11/05/13 12:31, Allan Jude wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what linux cron does, where there is a directory /etc/cron.d/ that packages and add files to to create crontabs. Making

Re: cron(8) improvement

2013-11-05 Thread Mark Felder
On Tue, Nov 5, 2013, at 11:37, Nikolai Lifanov wrote: On 11/05/13 12:31, Allan Jude wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what linux cron does, where there is a directory /etc/cron.d/ that

Re: cron(8) improvement

2013-11-05 Thread Allan Jude
On 2013-11-05 13:21, Mark Felder wrote: On Tue, Nov 5, 2013, at 11:37, Nikolai Lifanov wrote: On 11/05/13 12:31, Allan Jude wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to do what linux cron does, where there

Re: cron(8) improvement

2013-11-05 Thread Nikolai Lifanov
On 11/05/13 13:28, Allan Jude wrote: On 2013-11-05 13:21, Mark Felder wrote: On Tue, Nov 5, 2013, at 11:37, Nikolai Lifanov wrote: On 11/05/13 12:31, Allan Jude wrote: This came up in discussion on IRC and I thought I should throw it at the list so I don't forget. A user was asking how to