Date: Thu, 14 Aug 2014 21:55:52 +0200 From: Lars Engels <lars.engels@0x20.net> To: Dag-Erling =?utf-8?B?U23DuHJncmF2?= <des@des.no> Cc: freebsd-rc@freebsd.org Subject: Re: rc.conf.d improvement Message-ID: <20140814195552.GJ98029@e-new.0x20.net> In-Reply-To: <86a97bp27r.fsf@nine.des.no> References: <86a97bp27r.fsf@nine.des.no>
next in thread | previous in thread | raw e-mail | index | archive | help
--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/<service> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20140814195552.GJ98029>