On Thu, Jun 21, 2012 at 12:22:08PM +0200, Wojciech Puchar wrote: > Lets make a summary. > > What functionality would be good to have in FreeBSD that doesn't exist: > > 1) "runlevels" with arbitrary names. runlevel change would start and stop > right services. > 2) exploit startup parallelism. > > > What we do not want to change: > > - file structure which is simple. one file in rc.d/ per service and one > global config file (rc.conf) > - anything else that would make things more complicated. > > > As for > > 1) i propose in rc.conf an option to put "NO", "YES" (or ALL) or runlevel > list for each service or runlevel exclusion list for service. > > > examples: > > service1_enable="YES" > service2_enable="NO" > service3_enable="foolevel maintenance" > service4_enable="YES -foolevel" (or ALL -funkyrunlevel) > > name of default runlevel may be "full" or "multiuser" > > service 1 will always work, service 2 never, service 3 only at runlevels > "foolevel" and "maintenance", service4 with any runlevel except > "foolevel". > > still single rc.conf, not much bigger in practice. > > 2) no change in rc.d/* scripts and rc.conf, but change in scripts. > > > 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="YES" - enables the service ... IT IS NOT TO ALSO ADD MORE CRAP TO. Try something like the following... service_runlevels="1 2 3 4 5" And provide a way to say... allservice_runlevels="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= vars early on by just inspecting its _runlevel= var... Same thing could be had for a service profile script. nothing in etc/rc.d/ would have to be modified. -- - (2^(N-1))
pgpAPKdQ8kFpq.pgp
Description: PGP signature