From owner-freebsd-rc@FreeBSD.ORG Thu Aug 14 19:55:56 2014 Return-Path: Delivered-To: freebsd-rc@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 ESMTPS id 80A6F47F for ; Thu, 14 Aug 2014 19:55:56 +0000 (UTC) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0D15C27D4 for ; Thu, 14 Aug 2014 19:55:55 +0000 (UTC) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id E6E1F6A6004; Thu, 14 Aug 2014 21:55:52 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.7/8.14.7) with ESMTP id s7EJtqMO024310; Thu, 14 Aug 2014 21:55:52 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.7/8.14.7/Submit) id s7EJtqNX023569; Thu, 14 Aug 2014 21:55:52 +0200 (CEST) (envelope-from lars) Date: Thu, 14 Aug 2014 21:55:52 +0200 From: Lars Engels To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= Subject: Re: rc.conf.d improvement Message-ID: <20140814195552.GJ98029@e-new.0x20.net> References: <86a97bp27r.fsf@nine.des.no> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="aznLbwQ42o7LEaqN" Content-Disposition: inline In-Reply-To: <86a97bp27r.fsf@nine.des.no> X-Editor: VIM - Vi IMproved 7.4 X-Operation-System: FreeBSD 8.4-RELEASE-p4 User-Agent: Mutt/1.5.23 (2014-03-12) Cc: freebsd-rc@freebsd.org X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.18-1 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, 14 Aug 2014 19:55:56 -0000 --aznLbwQ42o7LEaqN Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Aug 11, 2014 at 03:47:52PM +0200, Dag-Erling Sm=C3=B8rgrav wrote: > The attached patch does two things: >=20 > 1) Add /etc/rc.conf.d to BSD.root.mtree so it's created during > installation; Yes, please do that. It's also related to https://reviews.freebsd.org/D451 If it's added to mtree I don't need to check for it in service(8). >=20 > 2) Modify rc.subr so that if /etc/rc.conf.d/ is a directory, > all of the files it contains are included. >=20 Also a good idea.=20 > Comments or objections? >=20 > DES > --=20 > Dag-Erling Sm=C3=B8rgrav - des@des.no >=20 > Index: etc/mtree/BSD.root.dist > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- etc/mtree/BSD.root.dist (revision 269808) > +++ etc/mtree/BSD.root.dist (working copy) > @@ -60,6 +60,8 @@ > .. > ppp > .. > + rc.conf.d > + .. > rc.d > .. > security > Index: etc/rc.subr > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- etc/rc.subr (revision 269808) > +++ etc/rc.subr (working copy) > @@ -1290,8 +1290,14 @@ > _rc_conf_loaded=3Dtrue > fi > if [ -f /etc/rc.conf.d/"$_name" ]; then > - debug "Sourcing /etc/rc.conf.d/${_name}" > + debug "Sourcing /etc/rc.conf.d/$_name" > . /etc/rc.conf.d/"$_name" > + elif [ -d /etc/rc.conf.d/"$_name" ] ; then > + local _rc > + for _rc in $(/bin/ls /etc/rc.conf.d/"$_name") ; do > + debug "Sourcing /etc/rc.conf.d/$_name/$_rc" > + . "/etc/rc.conf.d/$_name/$_rc" > + done > fi > =20 > # Set defaults if defined. > _______________________________________________ > freebsd-rc@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-rc > To unsubscribe, send any mail to "freebsd-rc-unsubscribe@freebsd.org" --aznLbwQ42o7LEaqN Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (FreeBSD) iQF8BAEBCgBmBQJT7RRIXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1tPbkH/AuI5RvWQmFK/FZbq+u7y+6W FW2sJWfm8PiQLEc+4h8lje3qTY6xp5Shf3SYmC0ymMVCAL6X/ljKo/vrszC9YQZz naqDBFLFfWLAgcbt7fmmHrqeKqHK3kD7j1RtRTV4g5nP0CB8ghcorggRfJ8fw74j vw4OKBfkZqJfDCZbRW8jygzIKfLOAdja0FWQv69qT+TddDtWv2Ggf14dulpWbElj yGoHMQBarKBAsK2OzbG6D09YlWhhpo9X95AA9kJXfBH3rwmOr9pMDWfdnKwF93XX WVbxQiwk/So8yTSYWzVttxqvYPT0V0fPUxXJS8no4EGs9I4Bk+3pXyTnbbyV6es= =GS1a -----END PGP SIGNATURE----- --aznLbwQ42o7LEaqN--