From owner-freebsd-rc@FreeBSD.ORG Sun Aug 10 01:36:53 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 285E032D for ; Sun, 10 Aug 2014 01:36:53 +0000 (UTC) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 1081F2209 for ; Sun, 10 Aug 2014 01:36:53 +0000 (UTC) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.14.8/8.14.8) with ESMTP id s7A1aq8v030770 for ; Sun, 10 Aug 2014 01:36:52 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-rc@FreeBSD.org Subject: [Bug 192374] Add new commands to rc(8): describe and extracommands Date: Sun, 10 Aug 2014 01:36:53 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 11.0-CURRENT X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: linimon@FreeBSD.org X-Bugzilla-Status: Needs Triage X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-rc@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: keywords component assigned_to Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.18 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: Sun, 10 Aug 2014 01:36:53 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=192374 Mark Linimon changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch Component|misc |conf Assignee|freebsd-bugs@FreeBSD.org |freebsd-rc@FreeBSD.org --- Comment #2 from Mark Linimon --- Over to maintainers. -- You are receiving this mail because: You are the assignee for the bug. From owner-freebsd-rc@FreeBSD.ORG Mon Aug 11 13:48:01 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 CA3E3609 for ; Mon, 11 Aug 2014 13:48:01 +0000 (UTC) Received: from smtp.des.no (smtp.des.no [194.63.250.102]) by mx1.freebsd.org (Postfix) with ESMTP id 8DC9D29CE for ; Mon, 11 Aug 2014 13:48:01 +0000 (UTC) Received: from nine.des.no (smtp.des.no [194.63.250.102]) by smtp-int.des.no (Postfix) with ESMTP id AF7387D9D for ; Mon, 11 Aug 2014 13:47:53 +0000 (UTC) Received: by nine.des.no (Postfix, from userid 1001) id A155223F7; Mon, 11 Aug 2014 15:47:52 +0200 (CEST) From: =?utf-8?Q?Dag-Erling_Sm=C3=B8rgrav?= To: freebsd-rc@freebsd.org Subject: rc.conf.d improvement Date: Mon, 11 Aug 2014 15:47:52 +0200 Message-ID: <86a97bp27r.fsf@nine.des.no> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.18 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: Mon, 11 Aug 2014 13:48:01 -0000 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable The attached patch does two things: 1) Add /etc/rc.conf.d to BSD.root.mtree so it's created during installation; 2) Modify rc.subr so that if /etc/rc.conf.d/ is a directory, all of the files it contains are included. Comments or objections? DES --=20 Dag-Erling Sm=C3=B8rgrav - des@des.no --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=rc-conf-d.diff Index: etc/mtree/BSD.root.dist =================================================================== --- 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 =================================================================== --- etc/rc.subr (revision 269808) +++ etc/rc.subr (working copy) @@ -1290,8 +1290,14 @@ _rc_conf_loaded=true 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 # Set defaults if defined. --=-=-=-- 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--