Date: Mon, 7 Sep 2015 17:59:35 +0300 From: Pavel Timofeev <timp87@gmail.com> To: Lars Engels <lars.engels@0x20.net> Cc: Stefan Esser <se@freebsd.org>, freebsd-hackers@freebsd.org Subject: Re: How to control and setup service? Message-ID: <CAAoTqfumRrvrmwNpajcPUUOY3z6nyTSS2fgsJC6iymyQ_ExyMg@mail.gmail.com> In-Reply-To: <20150907104458.GL16003@e-new.0x20.net> References: <CAAoTqfvxUznJp%2BtguAaYQ=5HfKXTG%2BGxY644wvqm4e9=E8WuHw@mail.gmail.com> <55DF261C.80009@freebsd.org> <20150827200534.GH16003@e-new.0x20.net> <CAAoTqfthyGatRokfv-umxjxNp3Qj9xE7A7veDFjQE%2B0PNUdDcA@mail.gmail.com> <CAAoTqfvHfZpdE7QcVGx_BWabdXN68XOGWOcJM33VoKfR7j6Dhw@mail.gmail.com> <55E086D3.1040700@freebsd.org> <CAAoTqfvGXevDtzHEevzuS_kwaezrJftQaY2R4H9UxNnBcEBYfg@mail.gmail.com> <CAAoTqfszP7a1ULNgZO43H_wTzjZu_kNj0n_kY5Skyj85FYUdNg@mail.gmail.com> <55E1803E.7080706@freebsd.org> <CAAoTqfthN5Eae6MJfmcZZDS8mdKoPekHg5DUxVv9xCw=nP62dQ@mail.gmail.com> <20150907104458.GL16003@e-new.0x20.net>
next in thread | previous in thread | raw e-mail | index | archive | help
2015-09-07 13:44 GMT+03:00 Lars Engels <lars.engels@0x20.net>: > On Mon, Aug 31, 2015 at 10:57:27AM +0300, Pavel Timofeev wrote: >> 2015-08-29 12:49 GMT+03:00 Stefan Esser <se@freebsd.org>: >> > Am 28.08.2015 um 18:51 schrieb Pavel Timofeev: >> >> Sorry for top posting! It's pretty hard to write email walking under >> >> heavy rain and umbrella. >> >> So, I talked about special key, not default behaviour. >> >> Let me give you an example. >> >> You got a server (or ten) which was/were somehow configured before you. >> >> You want to reconfigure it/them. You don't care how and where it's >> >> already configured, you just want to set particular rcvars and be sure >> >> that no other rcvars are set. >> >> >> >> Before you came it was: >> >> mysql_enable="YES/NO" # no matter >> >> mysql_datadir="/mycozystorage/db/mysql" >> >> mysql_defaults_extra_file="/mycozystorage/mysql/my.cnf" >> >> mysql_plugin_dir="/somewhere/lib/mysql/plugin" >> >> mysql_log_error="/mycozystorage/db/mysql/hostname.err" >> >> >> >> then you run something like (look at -k key) >> >> # service -k mysql-server enable set datadir "/mysqldb" log_error >> >> "/mysqllogs/hostname.err" >> >> it becomes >> >> mysql_enable="YES" >> >> mysql_datadir="/mysqldb" >> >> mysql_log_error="/mysqllogs/hostname.err" >> >> >> >> I. e. sets what requested and deletes rcvars which was not requested. >> > >> > I think that the removal of the previous config state should not come >> > as the side-effect of some "set" command. >> > >> > I'd rather introduce a now verb for this purpose, which has the effect >> > of clearing all previous settings for a service, instead of overloading >> > the "set" operation. >> >> BTW, it's already suggested here https://reviews.freebsd.org/D451 >> it's rcdelete. Not sure if it's good name. >> > > Back from holidays... > > It would be nice if we could find a consensus what should be done with > my patch in D451. The code itself works fine for me, but what's still > unclear is what config files should be touched by it: > > 1 /etc/rc.conf > 2 /etc/rc.conf.local > 3 /etc/rc.conf.d/$servicename > > I could add some flags to service(8), e.g. -l to edit rc.conf.local, -d > for /etc/rc.conf.d. I like an approach when /etc/rc.conf is a default place, and another default place is controlled through such flags. > > But please don't let the review rot any longer. :) Well, I'd reread this mail chain from the beginning. If you don't mind I could make a list of items/ideas, which can be discussed/approved/dropped then. >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAoTqfumRrvrmwNpajcPUUOY3z6nyTSS2fgsJC6iymyQ_ExyMg>