How to control and setup service?
Lars Engels
lme at freebsd.org
Wed Sep 9 13:26:09 UTC 2015
On Mon, Sep 07, 2015 at 12:37:55PM -0400, Allan Jude wrote:
> On 2015-09-07 06:44, Lars Engels wrote:
> > On Mon, Aug 31, 2015 at 10:57:27AM +0300, Pavel Timofeev wrote:
> >> 2015-08-29 12:49 GMT+03:00 Stefan Esser <se at 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.
> >
> > But please don't let the review rot any longer. :)
> >
> >
>
> I plan to have a discussion about your review and the right solutions at
> the vBSDCon dev summit this friday. Don't worry, your review is not rotting.
Yes, I saw that you sent an updated patch for review. Thanks!
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 603 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-hackers/attachments/20150909/a15aee85/attachment.bin>
More information about the freebsd-hackers
mailing list