From owner-freebsd-rc@FreeBSD.ORG Thu Sep 6 17:01:05 2012 Return-Path: Delivered-To: rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 82798106570E for ; Thu, 6 Sep 2012 17:01:05 +0000 (UTC) (envelope-from david@catwhisker.org) Received: from albert.catwhisker.org (m209-73.dsl.rawbw.com [198.144.209.73]) by mx1.freebsd.org (Postfix) with ESMTP id 40E968FC0C for ; Thu, 6 Sep 2012 17:01:01 +0000 (UTC) Received: from albert.catwhisker.org (localhost [127.0.0.1]) by albert.catwhisker.org (8.14.5/8.14.5) with ESMTP id q86H11QI017348; Thu, 6 Sep 2012 10:01:01 -0700 (PDT) (envelope-from david@albert.catwhisker.org) Received: (from david@localhost) by albert.catwhisker.org (8.14.5/8.14.5/Submit) id q86H11sE017347; Thu, 6 Sep 2012 10:01:01 -0700 (PDT) (envelope-from david) Date: Thu, 6 Sep 2012 10:01:01 -0700 From: David Wolfskill To: rc@freebsd.org Message-ID: <20120906170101.GV1486@albert.catwhisker.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="aXNiKu4lnbRqA5kZ" Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) Cc: David Wolfskill Subject: rc.d/cron appears to ignore rcvar "cron_program" -- intentional? X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Sep 2012 17:01:05 -0000 --aXNiKu4lnbRqA5kZ Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I was poking around to see if I could find a reasonable way to set the UNAME_r environment variable for an instance of cron(8) running in a jail (so that cron-initiated tasks could automagically inherit the value, without requiring that every crontab instance within the jail specify it), and I started to think about ways to coerce the cron_program variable from /etc/defaults/rc.conf: d134(8.3-S)[2] grep cron defaults/rc.conf=20 cron_enable=3D"YES" # Run the periodic job daemon. cron_program=3D"/usr/sbin/cron" # Which cron executable to run (if enable= d). cron_dst=3D"YES" # Handle DST transitions intelligently (YES/NO) cron_flags=3D"" # Which options to pass to the cron daemon. entropy_dir=3D"/var/db/entropy" # Set to NO to disable caching entropy via = cron. d134(8.3-S)[3]=20 to set the environment variable. But inspection of rc.d/cron shows: d134(8.3-S)[6] grep cron_program rc.d/cron ; echo $? 1 d134(8.3-S)[7]=20 Note: while the machine was running stable/8, I was looking at files on the "head" slice: d134(8.3-S)[7] grep '\$FreeBSD' rc.d/cron=20 # $FreeBSD: head/etc/rc.d/cron 230099 2012-01-14 02:18:41Z dougb $ d134(8.3-S)[8]=20 Does the observation make sense? (If anyone has insights on how I might address the issue that catalyzed my poking around, I'd be happy to receive them.) Please Cc: me on responses, as I am not currently subscribed to rc@. Thanks! Peace, david --=20 David H. Wolfskill david@catwhisker.org Depriving a girl or boy of an opportunity for education is evil. See http://www.catwhisker.org/~david/publickey.gpg for my public key. --aXNiKu4lnbRqA5kZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlBI1swACgkQmprOCmdXAD3fJQCfbPLRvPntkkvZX7PIil/yuZ0E TsEAn2EaD73AY5kPHqrvKNfSWrPEIXEW =bxY5 -----END PGP SIGNATURE----- --aXNiKu4lnbRqA5kZ--