Date: Sat, 26 Nov 2011 00:11:21 -0500 From: Jason Hellenthal <jhell@DataIX.net> To: Christian Kastner <debian@kvr.at> Cc: freebsd-hackers@freebsd.org Subject: Re: cron(8) mis-feature with @reboot long after system startup Message-ID: <20111126051121.GA4628@DataIX.net> In-Reply-To: <4ED00A68.4040606@kvr.at> References: <20111125070241.GA7915@DataIX.net> <4ED00A68.4040606@kvr.at>
next in thread | previous in thread | raw e-mail | index | archive | help
--LQksG6bCIzRHxTLp Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Fri, Nov 25, 2011 at 10:36:40PM +0100, Christian Kastner wrote: > Hi, >=20 > On 2011-11-25 08:02, Jason Hellenthal wrote: > > So with that said... is there a way we could actually make this run @re= boot only ? >=20 > Debian's cron[0] and Fedora's cronie[1] have solved this by touching a > file on first startup and running @reboot only when this file does not > yet exist. >=20 > Note that while [0] may point to other patches that might be of interest > to FreeBSD, they are still WIP (as evident from the linked patch) as we > are still in the process of quiltifying our current code base. >=20 While this sounds like a perfectly sane way to handle the problem at hand t= his also introduces a need to write some cleanup code to take care of the f= ile semantics. I think comparing daemon start times to the time a system wa= s booted or similiar would alleviate the need for all that. Maybe a flag fo= r @reboot "-s <seconds>" seconds after boottime to allow running @reboot jo= bs. And set the default to 3600 seconds. At least this would allow adjustme= nt for those startup processes that may take some considerable time before = multiuser mode is entered.=20 Just some thought. I really don't think we need to go the route of using files to store inform= ation when there is enough information available already via syscall's. >=20 > [0] > http://anonscm.debian.org/gitweb/?p=3Dpkg-cron/pkg-cron.git;a=3Dblob;f=3D= debian/patches/features/run-on-reboot;h=3D94bab7dcbc4b34e4686385ca3ba303745= 3f1f4bb;hb=3Drefs/heads/sf3 >=20 > [1] > http://git.fedorahosted.org/git/?p=3Dcronie.git;a=3Dcommitdiff;h=3D2abb46= f60f496e2725333a86ade0f3913981761d >=20 --LQksG6bCIzRHxTLp Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- iQEcBAEBAgAGBQJO0HT4AAoJEJBXh4mJ2FR+mooH/iN1y855ce0wwIL3UnJOOYHz U/N7gkPdFbuMJG2BARdApZpwuZ4HNNGnwE0S/aprJKzheHPM5/9vhLUDV8jzGxf9 RcCHvPes4viheH2XV3/ahrhqCodpSFKN7Gb/YwGM0fIcgvUf2Atv/P20Ur+/x2GE ZtdR+IO9a0GgjorKBclvD8j3JnXsZ7mY45dJ/xI5zYDH7k7OMGJhovCkfTOjWkhX zLYxwc4GKKBFkSNGTpzObENdYCHqKh1Bk/Vu7azrzmBX3qizPrKLVOg2eGt0ddm+ dMX+4t1iepd041zS5Q5k+y2uMDJrGfyiKDlYY6s+bOcLyLyNxGntWRiz2b5uYxc= =v2fY -----END PGP SIGNATURE----- --LQksG6bCIzRHxTLp--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20111126051121.GA4628>