From owner-freebsd-current@FreeBSD.ORG Sun Nov 10 01:58:39 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6FD3492D; Sun, 10 Nov 2013 01:58:39 +0000 (UTC) (envelope-from freebsd@allanjude.com) Received: from mx1.scaleengine.net (beauharnois2.bhs1.scaleengine.net [142.4.218.15]) by mx1.freebsd.org (Postfix) with ESMTP id 3CE172EFB; Sun, 10 Nov 2013 01:58:38 +0000 (UTC) Received: from [10.1.1.1] (S01060001abad1dea.hm.shawcable.net [50.70.108.129]) (Authenticated sender: allan.jude@scaleengine.com) by mx1.scaleengine.net (Postfix) with ESMTPSA id 8847446970; Sun, 10 Nov 2013 01:58:36 +0000 (UTC) Message-ID: <527EE84D.4060901@allanjude.com> Date: Sat, 09 Nov 2013 20:58:37 -0500 From: Allan Jude User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.1.0 MIME-Version: 1.0 To: Adrian Chadd Subject: Re: cron(8) improvement References: <52792B60.1030309@allanjude.com> <527AFAA1.1040001@allanjude.com> <527BCA55.2000207@allanjude.com> <527C5D52.7030508@allanjude.com> <047405A8-B6EB-427B-A2E4-6254DD1A077B@orthanc.ca> <3E6377FF-69FE-48E4-BFB1-E5095A7FA1BB@orthanc.ca> <527C6DEF.6020102@allanjude.com> <527E3EB3.6000301@FreeBSD.org> <8034B822-F903-43D1-8BF6-DFAD7C22F5B0@gsoft.com.au> <527ED34A.1060401@allanjude.com> <527EE417.6060704@allanjude.com> In-Reply-To: X-Enigmail-Version: 1.6 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="G8prX8sRFpQjf4CDsHhgKspxRnNbqp8IW" Cc: freebsd-current X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 10 Nov 2013 01:58:39 -0000 This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --G8prX8sRFpQjf4CDsHhgKspxRnNbqp8IW Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable On 2013-11-09 20:55, Adrian Chadd wrote: > On 9 November 2013 17:40, Allan Jude wrote: >> On 2013-11-09 20:05, Adrian Chadd wrote: >>> On 9 November 2013 16:28, Allan Jude wrote: >>> >>>> Well, what about making these extra directories optional then? >>>> >>>> packages install the crontab entries, but crond ignores them unless = you add: >>>> >>>> cron_flags=3D"--scandir /etc/cron.d --scandir /usr/local/etc/cron.d"= >>>> >>>> or something to that effect >>>> >>>> As for packages enabling things, this seems like a good use of the >>>> /etc/rc.conf.d/ infrastructure, although it has a kind of odd struct= ure, >>>> where the individual files are only included if the name of the serv= ice >>>> being started patches. So for example, /etc/rc.conf.d/sshd wouldn't = be >>>> read when starting crond >>> Right. I'd rather it read in everything, but I realise that scales po= orly. >>> >>> The other alternative is to have a config file populated with the >>> contents of /etc/rc.conf.d/*, so to modify it you'd edit the >>> individual config file(s), then do a "commit" operation to push it >>> into the cache. >>> >>> If the cache file doesn't exist, it simply goes through and reads * >>> >>> if someone wanted to speed up the rcvar set, they could just replace >>> it with a read from an sqlite table or an individual config file (as >>> said above); the rcvar thing is -supposed- to just be attribute=3Dval= ue, >>> so it can be stored anywhere. >>> >>> Note to previous poster: i think the existing policy sucks. :-) >>> >>> >>> -adrian >> I suppose you could easily do something like: cat /etc/rc.conf.d/* > >> /etc/rc.conf.cat >> >> and add rc.conf.cat to rc_conf_files > Right. But what this scheme specifically needs is some semantics for > "thing I do to push new config changes into the rc.conf system" and > "thing I do to force a commit of these changes." > > For the rc.conf.cat version, it would do the above. It may just wrap > it in a lock file. > > For the sqlite hack version, it would grab a lock and dump everything > into an sqlite table. > > The point is that it shouldn't be adhoc. there should be some tools in > base for "things" to add/remove cron configs, add/remove rc.conf > configs, and do a "rebuild" of them. > > > -adrian 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 package create /etc/rc.conf.d/hald and /etc/rc.conf.d/dbus I like the simplicity of rc.conf, and I would much rather not involve an sqlite database, I am not sure how that could possibly be faster then sourcing an extra shell script. --=20 Allan Jude --G8prX8sRFpQjf4CDsHhgKspxRnNbqp8IW Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.16 (MingW32) Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/ iQIcBAEBAgAGBQJSfuhRAAoJEJrBFpNRJZKfrMUQAL2sbCIs9ctiUQcKgm8hv85a 8H/aagTVDqE2FRSAqlafYuPYq84p6+6g5x/3cNDk52KJis2mm7Rr+avb0rvflzH5 EErdcGMDzHWrAQjZ9H1fEa5E2ufOSdRmPGuXy+5cJv+wU7MexREFEAOKf/GAd0n2 Rc3dWpdPb7h+ZLGDgX+qokfp4ua96wbNPnJSir8gQIg7zRTPd3zml3+Jt5H1CXRz JU0AN04sftlVnGxSq6Qoh11C4oswm5pg/LRw55BB71X7JY4LStGWB4CVAY/f1veC s+apT6s7rxtQcRTba8RBJcHTT3pIWOdHRUzlBXzJMDtIx28653zB8gduhOO1OZnO nCtKtPw98kUn9GrGnjPKltpNDfS+drZAopKWG2BYEoJDNTnRokg2vxLxWFl5WnGq eIvvzIzoT7NJTeMnbLZwLXIi3danlFF0CecqOj8FRpXUHscyvoF+kxWZ//8u4T7c uxC8tGEy6fQAMeatXnQxcdMP6UDgpDVGXiG8KWDNSehKa9JTIAMK9I+IlmUEO69T c99FDTpKa5K0BshKrsIODeC4eZCTPS4kqwbBcHO2t7r0SY5aQ+ymbiVQNTnJUhom 1tuFbNugF/eVrL1Oo/X6rinYmz/j2LjaSTQzdI1LRsW56yu7mD7EAIw8/d554ldw 8hRsz3LNhxgfWKEPu1sj =kBzT -----END PGP SIGNATURE----- --G8prX8sRFpQjf4CDsHhgKspxRnNbqp8IW--