Date: Sun, 20 Jul 2008 12:03:32 +0300 From: Danny Braniss <danny@cs.huji.ac.il> To: Peter Ross <Peter.Ross@bogen.in-berlin.de> Cc: Doug Barton <dougb@FreeBSD.org>, Robert Noland <rnoland@2hip.net>, freebsd-current@FreeBSD.org, ticso@cicely.de Subject: Re: rc improvements (wanted?) Message-ID: <E1KKUpI-0004Ld-CR@cs1.cs.huji.ac.il> In-Reply-To: <20080720003343.S23554@oldie.bigpond.com> References: <200807172056.08835.naylor.b.david@gmail.com> <487FCA89.2010308@FreeBSD.org> <20080718083725.97823be0tg13fn6s@webmail.leidinger.net> <20080718071806.GV62764@server.vk2pj.dyndns.org> <20080718122928.GD35340@cicely7.cicely.de> <4881795A.4070604@FreeBSD.org> <1216473536.1991.5.camel@wombat.2hip.net> <20080720003343.S23554@oldie.bigpond.com>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Sat, 19 Jul 2008, Robert Noland wrote:
>
> > On Fri, 2008-07-18 at 22:19 -0700, Doug Barton wrote:
> > > Bernd Walter wrote:
> > > > Speaking about small systems, where startup time is more a problem than
> > > > on 08/15 desktop and server systems.
> > > > What I would love to see is that scripts like moused, ypserv, lpt, etc
> > > > are not started if the services are disabled.
> > >
> > > That wold be a neat trick, how do you propose we accomplish it? (no,
> > > I'm not being snide.)
> > > ..
> > > One way you could do this is to have /etc/rc.d/active and
> > > /etc/rc.d/inactive (and probably an /etc/rc.d/system for critical
> > > stuff that most people shouldn't touch). Then you could have a
> > > vipw-like system to allow users to edit rc.conf that would move the
> > > scripts to the right directory. Of course, this would be fraught with
> > > potential for problems. :)
> >
> > I almost hate to toss this out there, but what about a sys v type rc?
>
> Usually the scripts are running run_rc_command.
>
> This does a checkyesno for the rcvar variable which is usually
> ${name}_enable. In most of the cases it uses set_rcvar to achieve this.
>
> If so, /etc/rc could evaluate ${name}_enable (it already knows them via
> /etc/rc.conf) before actually calling a script.
>
> There are some irregular names amongst the name of the rcvar variable.
>
> I am not 100% sure whether same of the scripts set ${name}_enable vaiables
> implicitly. That could complicate things. I could not find evidence by
> browsing through them.
I went ahead with my idea - to reduce the list rcorder delivers, by eliminating
those that don't have ${name}_enable, and I opened a pandora box :-)
- dummy dependency like SERVERS/LOGIN don't have ${name}_enable
nor should have.
- REQUIERE: xxx complains if xxx is not 'loaded' like in the case
of NETWORKING requirement of ppp which I don't have enabled.
- some scripts rely on the existance of a ${file} which is better than
the original /etc/rc which used to run mountd if /etc/exports existed,
but does not 'conform' to the ${name}_enable paradigm.
- some scripts like abi don't have abi_enable, but sysvipc_enable,
linux_enable and svr4_enable.
All these - and some more that I probably missed - can be fixed, or the
warnings
ignored, but is it worthwhile?
>
> I also do not know whether there are scripts that actually do something
> valuable before calling run_rc_command.
>
> At the moment it looks to me that these excemptions could be dealt with by
> adapting the scripts so they meet the standard (running only when
> ${name}_enable is set).
>
> I only looked through some of the /etc/rc.d scripts en detail (+ some
> greps for rcvar etc. in the directory) so it needs some more
> investigation.
>
> If it works it avoids messing around with symlinks or moving scripts
> around, and it reduces the scripts that actually run.
>
> As a sys admin I really like the BSD way of having everything relevant to
> my system in one /etc/rc.conf. It is very convenient.
>
> Regards
> Peter
> _______________________________________________
> freebsd-current@freebsd.org mailing list
> http://lists.freebsd.org/mailman/listinfo/freebsd-current
> To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1KKUpI-0004Ld-CR>
