From owner-freebsd-hackers@FreeBSD.ORG Sat Nov 26 07:09:02 2011 Return-Path: Delivered-To: hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 04BB9106566B for ; Sat, 26 Nov 2011 07:09:02 +0000 (UTC) (envelope-from Cy.Schubert@komquats.com) Received: from idcmail-mo2no.shaw.ca (idcmail-mo2no.shaw.ca [64.59.134.9]) by mx1.freebsd.org (Postfix) with ESMTP id BD4268FC0C for ; Sat, 26 Nov 2011 07:09:01 +0000 (UTC) Received: from lb7f8hsrpno-svcs.dcs.int.inet (HELO pd5ml3no-ssvc.prod.shaw.ca) ([10.0.144.222]) by pd6mo1no-svcs.prod.shaw.ca with ESMTP; 26 Nov 2011 00:09:01 -0700 X-Cloudmark-SP-Filtered: true X-Cloudmark-SP-Result: v=1.1 cv=K6fnQZae8TPX1i0cofjQtTsb/A4CHt4xfMPVU6P219U= c=1 sm=1 a=FNQ37yD0mI0A:10 a=QrugwKR0C_UA:10 a=wAGQQ9Az6v0A:10 a=BLceEmwcHowA:10 a=ICAaq7hcmGcA:10 a=8nJEP1OIZ-IA:10 a=2Er20JxOMs3KTlR2XTlUiQ==:17 a=s1O25tkdAAAA:8 a=BWvPGDcYAAAA:8 a=6I5d2MoRAAAA:8 a=p6W2Vv0txPRS-G8_77cA:9 a=3OlXMcyiwNwU2BbtYn0A:7 a=wPNLvfGTeEIA:10 a=OyOq_G8mXAEA:10 a=V7tsTZBp22UA:10 a=SV7veod9ZcQA:10 a=HpAAvcLHHh0Zw7uRqdWCyQ==:117 Received: from unknown (HELO spqr.komquats.com) ([24.68.73.211]) by pd5ml3no-dmz.prod.shaw.ca with ESMTP; 26 Nov 2011 00:09:00 -0700 Received: from slippy.cwsent.com (slippy [10.1.1.91]) by spqr.komquats.com (Postfix) with ESMTP id 0C2CB46B6B; Fri, 25 Nov 2011 23:08:59 -0800 (PST) Received: from slippy (localhost [127.0.0.1]) by slippy.cwsent.com (8.14.5/8.14.5) with ESMTP id pAQ78wvO045883; Fri, 25 Nov 2011 23:08:59 -0800 (PST) (envelope-from Cy.Schubert@komquats.com) Message-Id: <201111260708.pAQ78wvO045883@slippy.cwsent.com> X-Mailer: exmh version 2.7.2 01/07/2005 with nmh-1.3 From: Cy Schubert X-os: FreeBSD X-Sender: cy@cwsent.com X-URL: http://www.komquats.com/ To: Warren Block In-Reply-To: Message from Warren Block of "Fri, 25 Nov 2011 10:53:39 MST." Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable Date: Fri, 25 Nov 2011 23:08:58 -0800 Cc: Tom Evans , hackers@freebsd.org Subject: Re: cron(8) mis-feature with @reboot long after system startup X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Cy Schubert List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Nov 2011 07:09:02 -0000 In message , 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 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 FreeBSD UNIX: Web: http://www.FreeBSD.org