From owner-freebsd-rc@FreeBSD.ORG Wed Nov 2 18:38:38 2005 Return-Path: X-Original-To: freebsd-rc@freebsd.org Delivered-To: freebsd-rc@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id C2FD716A420; Wed, 2 Nov 2005 18:38:38 +0000 (GMT) (envelope-from past@ebs.gr) Received: from fly.ebs.gr (fly.ebs.gr [62.103.84.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id C932343D48; Wed, 2 Nov 2005 18:38:36 +0000 (GMT) (envelope-from past@ebs.gr) Received: from ebs.gr (root@hal.ebs.gr [10.1.1.2]) by fly.ebs.gr (8.12.9p1/8.12.9) with ESMTP id jA2IcO9V004592; Wed, 2 Nov 2005 20:38:24 +0200 (EET) (envelope-from past@ebs.gr) Received: from [10.1.1.200] (pptp.ebs.gr [10.1.1.200]) by ebs.gr (8.13.3/8.12.11) with ESMTP id jA2IcYVm025811; Wed, 2 Nov 2005 20:38:34 +0200 (EET) (envelope-from past@ebs.gr) Message-ID: <43690768.9010708@ebs.gr> Date: Wed, 02 Nov 2005 20:37:28 +0200 From: Panagiotis Astithas Organization: EBS Ltd. User-Agent: Mozilla Thunderbird 1.0.7 (X11/20051008) X-Accept-Language: en-us, en MIME-Version: 1.0 To: Maksim Yevmenkin References: <4353DBBC.2000508@savvis.net> <43541F79.6040008@ebs.gr> <43554BCE.7090309@savvis.net> <4355FD0C.2090702@ebs.gr> <4356D12F.7000006@savvis.net> <43576A9D.1050209@ebs.gr> <4357CEA5.1000308@savvis.net> <4357D9E2.6010701@ebs.gr> <4367E346.4080106@savvis.net> <20051102111709.GD2465@comp.chem.msu.su> <20051102161311.GA8499@odin.ac.hmc.edu> <43690365.60909@savvis.net> In-Reply-To: <43690365.60909@savvis.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-rc@freebsd.org, freebsd-bluetooth@freebsd.org Subject: Re: [RFC] rc.d integration for the bluetooth subsystem X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 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: Wed, 02 Nov 2005 18:38:39 -0000 Maksim Yevmenkin wrote: > Brooks Davis wrote: > >> On Wed, Nov 02, 2005 at 02:17:09PM +0300, Yar Tikhiy wrote: >> >>> On Tue, Nov 01, 2005 at 01:51:02PM -0800, Maksim Yevmenkin wrote: >>> >>>> please find the first draft of bluetooth rc.d scripts located at >>>> >>>> http://people.freebsd.org/~emax/bluetooth-rc.diff.txt >>>> >>>> this patch adds >>>> >>>> 1) /etc/rc.d/bluetooth script that will be used to start and stop >>>> bluetooth devices. it will be called by devd(8) in response to >>>> device arrival and departure events. the script also supports >>>> _optional_ per device configuration. per device configuration is >>>> stored in /etc/rc.conf.d/bluetooth.$dev file, where $dev is the >>>> driver name of the device, i.e. ubt0, sio4, btccc1 >>>> >>>> 2) /etc/rc.conf.d/bluetooth.device.sample script. this is just an >>>> example. it should be copied to /etc/rc.conf.d/bluetooth.$dev and >>>> then defaults can be adjusted. once again if there is no >>>> /etc/rc.conf.d/bluetooth.$dev script then reasonable defaults will >>>> be used. >>> >>> >>> My concern is about putting things not related directly to system >>> startup driven by rc(8) in /etc/rc.d and /etc/rc.conf.d directories. >>> Perhaps it would be better to still use rc.subr as a source of great >>> subroutines, but place the bluetooth scripts and configs in their >>> own directories -- rc.subr should support this. >> >> >> I don't disagree, but we've already got three scripts like this in >> /etc/rc.d (dhclient, power_profile, and wpa_supplicant) so I don't think >> it's a big deal. IMO, the conf files are find (though I don't like the > > > this was another thing that i was worried about too :) however, as you > pointed out, rc.d already has few 'nostart' scripts. keep in mind that > even though /etc/rc.d/bluetooth has 'nostart' keyword it is still > possible to execute it by hand, i.e. '/etc/rc.d/bluetooth restart ubt0' > and it will work. this way you could restart bluetooth stack without > unplugging the device. i imagine one might want to tweak config and the > restart the stack. imo, /etc/rc.d is a good place for bluetooth script. > >> idea of a .sample in /etc/rc.conf.d). There is some argument for moving >> the scripts to another directory though. I'm not sure what we'd call >> it though. > > > ok, let me re-phrase the question then > > do you think that having multiple config files under /etc/rc.conf.d is a > good idea? > > do you think that other subsystem might benefit from similar (to > bluetooth) config style or bluetooth will be the only subsystem that > uses it? > > i'd really hate to introduce somewhat new config style just for > bluetooth. i really do not want people whine about it and ask why they > cant put things into /etc/rc.conf (where the rest of config is). freebsd > is not linux. adding or changing things should produce benefits that > would overweight potential complains from users, imo. A somewhat similar situation exists with the /etc/start_if.$dev scripts. They contain per-device configuration, but they are dumped in /etc. If there is discomfort about creating rc.conf.d just for the bluetooth subsystem, perhaps /etc could be chosen instead. Another way might be to use a single /etc/bluetooth.conf along the lines of /etc/wpa_supplicant.conf (one section per device), but this requires more parsing work for the /etc/rc.d/bluetooth script. I'm not sure if it is worth it. FWIW, I really like the bluetooth.device.sample contents. Cheers, Panagiotis