Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 21 Jun 2012 12:15:13 -0400
From:      Jason Hellenthal <jhellenthal@dataix.net>
To:        Wojciech Puchar <wojtek@wojtek.tensor.gdynia.pl>
Cc:        "freebsd-hackers@freebsd.org" <freebsd-hackers@freebsd.org>, openrc@gentoo.org
Subject:   Re: Replacing rc(8) (Was: FreeBSD Boot Times)
Message-ID:  <20120621161513.GA88762@DataIX.net>
In-Reply-To: <alpine.BSF.2.00.1206211159280.1662@wojtek.tensor.gdynia.pl>
References:  <4FE0C123.8030301@gentoo.org> <CAGH67wRidMZrzjzTSdwud%2BZ5V--wOTN8CHXOWcOr%2BE5XHYo2rA@mail.gmail.com> <4FE0F773.1080403@gentoo.org> <CAGH67wQdb-c0Kf=60rkaJSH8Hd0OjwCi=rQQMzGq8xfp2q7b=Q@mail.gmail.com> <4FE100F9.2050009@funtoo.org> <20120620073920.GA5300@lonesome.com> <alpine.BSF.2.00.1206201618560.75278@wojtek.tensor.gdynia.pl> <CAPDOV49kkOdeV%2B6LVW5j5PO6VYrrNVqWZEksc_GzvWHjbufoAQ@mail.gmail.com> <20120620214006.GA1651@aspire.rulingia.com> <alpine.BSF.2.00.1206211159280.1662@wojtek.tensor.gdynia.pl>

next in thread | previous in thread | raw e-mail | index | archive | help

--oyUTqETQ0mS9luUI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable



On Thu, Jun 21, 2012 at 12:22:08PM +0200, Wojciech Puchar wrote:
> Lets make a summary.
>=20
> What functionality would be good to have in FreeBSD that doesn't exist:
>=20
> 1) "runlevels" with arbitrary names. runlevel change would start and stop=
=20
> right services.
> 2) exploit startup parallelism.
>=20
>=20
> What we do not want to change:
>=20
> - file structure which is simple. one file in rc.d/ per service and one=
=20
> global config file (rc.conf)
> - anything else that would make things more complicated.
>=20
>=20
> As for
>=20
> 1) i propose in rc.conf an option to put "NO", "YES" (or ALL) or runlevel=
=20
> list for each service or runlevel exclusion list for service.
>=20
>=20
> examples:
>=20
> service1_enable=3D"YES"
> service2_enable=3D"NO"
> service3_enable=3D"foolevel maintenance"
> service4_enable=3D"YES -foolevel" (or ALL -funkyrunlevel)
>=20
> name of default runlevel may be "full" or "multiuser"
>=20
> service 1 will always work, service 2 never, service 3 only at runlevels=
=20
> "foolevel" and "maintenance", service4 with any runlevel except=20
> "foolevel".
>=20
> still single rc.conf, not much bigger in practice.
>=20
> 2) no change in rc.d/* scripts and rc.conf, but change in scripts.
>=20
>=20
> If everyone agree i think i may write this new scripts.

Sorry but I completely disagree here. Why ?

Because do one thing and do one thing well. What do you mean ?

service_enable=3D"YES" - enables the service ... IT IS NOT TO ALSO ADD
MORE CRAP TO.

Try something like the following...

service_runlevels=3D"1 2 3 4 5"

And provide a way to say...

allservice_runlevels=3D"3 4 5" which would basically state that every
service runs under runlevel 3,4,5 unless specifically stated.


Lets not bastardize this overly simple process by modifying already
existing variables. Add a framework to coexist and teach rc to respect
and comply with it.

current rc scripts would not have to be modified if done correctly as
well. You can short circuit the _enable=3D vars early on by just
inspecting its _runlevel=3D var...


Same thing could be had for a service profile script. nothing in etc/rc.d/
would have to be modified.


--=20

 - (2^(N-1))

--oyUTqETQ0mS9luUI
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----

iQEcBAEBAgAGBQJP40iRAAoJEBSh2Dr1DU7WZZwH/3M+IMVRyWL7iFKjm7V2MONg
HHOzUfLfbVZQB0UIkUJTKeIm7CKAcQjMVXosbu8x22fYwVRBOKPOdfWy2UbQvipx
Gz38AYiUAt3n9Yr2smPP6+17DL+PHeqXiUaFkohBa3RoPdFVzyvO1HpB84MGKufm
LtA8awDzULSbDWB/44UpYR3uCdT0wPkkfhzkE1AiEwVijydAEkv/R+ZJH4mal37a
1fH2DoHfApTq5BICi4K7Ko3HE17TobnqKPN9WcUdBgY/mdvMPCP8Qblywqb2V2Nt
rlHebCRT6Tm+NWC/x/kLj/fQvyXu2/faslurEWrKL1sFsTKq7DnCp2fIO++I1ig=
=n1YJ
-----END PGP SIGNATURE-----

--oyUTqETQ0mS9luUI--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20120621161513.GA88762>