Date: Fri, 25 Nov 2011 23:08:58 -0800 From: Cy Schubert <Cy.Schubert@komquats.com> To: Warren Block <wblock@wonkity.com> Cc: Tom Evans <tevans.uk@googlemail.com>, hackers@freebsd.org Subject: Re: cron(8) mis-feature with @reboot long after system startup Message-ID: <201111260708.pAQ78wvO045883@slippy.cwsent.com> In-Reply-To: Message from Warren Block <wblock@wonkity.com> of "Fri, 25 Nov 2011 10:53:39 MST." <alpine.BSF.2.00.1111251042110.80691@wonkity.com>
next in thread | previous in thread | raw e-mail | index | archive | help
In message <alpine.BSF.2.00.1111251042110.80691=40wonkity.com>, Warren Bl= ock=20 writ es: > This message is in MIME format. The first part should be readable te= xt, > while the remaining parts are likely unreadable without MIME-aware to= ols. >=20 > ---902635197-1839580335-1322243619=3D:80691 > Content-Type: TEXT/PLAIN; charset=3DUTF-8; format=3Dflowed > Content-Transfer-Encoding: 8BIT >=20 > On Fri, 25 Nov 2011, Tom Evans wrote: >=20 > > On Fri, Nov 25, 2011 at 4:09 PM, Cy Schubert <Cy.Schubert=40komquats.= com> wro > te: > >> Changing the behaviour by default would change the semantics of =40r= eboot, > >> altering =C2=A0the behaviour of cron jobs which rely on the brokenne= ss. What if > >> both behaviours are wanted on the same system? Unlikely, as I can't = see > >> anyone relying on this broken behaviour. Having said that, I'm sure = there > >> are cron jobs that do rely on the broken behaviour, so it may be bes= t to > >> simply deprecate the broken behaviour and make one or the other a co= mmand > >> line option. > > > > > > The problem is that the behaviour is not broken, it works exactly as > > described in crontab(5) - it is just confusing. >=20 > But crontab(5) just says =22startup=22, when really it means =22cron st= artup=22,=20 > so: http://svnweb.freebsd.org/base?view=3Drevision&revision=3D227981 >=20 > > It's also slightly nonsensical - the command isn't run at reboot, it > > is run at boot. >=20 > It isn't just at boot, even. Really it should be called =40cronstart. > But that ship probably sailed a long time ago. A better alias could be= =20 > added and =40reboot marked as deprecated. (This does not address the=20 > technical problem of really only running something at system startup.=20 > IMHO, rc scripts are a better fit for that.) Agreed, that's what rc scripts are for. OTOH, a non-root user can't create rc scripts. Having said that, any=20 non-root rc scripts I've ever run always required negotiation, e.g. oracl= e=20 and other apps. You want to start other apps in a specified order. When running non-root rc scripts, it's a simple matter of, /bin/su - oracle -c '/home/oracle/product/oracle-8i/bin/startup.sh' If average users really do need to run something at boot they're likely=20 running some kind of service, e.g. some kind of DBMS, on the machine and = that would usually if not always require some kind of cooperation with th= e=20 sysadmin. --=20 Cheers, Cy Schubert <Cy.Schubert=40komquats.com> FreeBSD UNIX: <cy=40FreeBSD.org> Web: http://www.FreeBSD.org
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111260708.pAQ78wvO045883>