Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Aug 2015 19:03:00 +0300
From:      Pavel Timofeev <timp87@gmail.com>
To:        Lars Engels <lars.engels@0x20.net>
Cc:        freebsd-hackers@freebsd.org, Devin Teske <dteske@freebsd.org>,  Allan Jude <allanjude@freebsd.org>
Subject:   Re: How to control and setup service?
Message-ID:  <CAAoTqfvHfZpdE7QcVGx_BWabdXN68XOGWOcJM33VoKfR7j6Dhw@mail.gmail.com>
In-Reply-To: <CAAoTqfthyGatRokfv-umxjxNp3Qj9xE7A7veDFjQE%2B0PNUdDcA@mail.gmail.com>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
One more idea is to have a key that would delete from rc config file any
other rcopts which are not being set by tool when user run it.
Like delete all of already defined rcopts and then set only requested
rcopts.
28 =D0=B0=D0=B2=D0=B3. 2015 =D0=B3. 11:58 =D0=BF=D0=BE=D0=BB=D1=8C=D0=B7=D0=
=BE=D0=B2=D0=B0=D1=82=D0=B5=D0=BB=D1=8C "Pavel Timofeev" <timp87@gmail.com>
=D0=BD=D0=B0=D0=BF=D0=B8=D1=81=D0=B0=D0=BB:

> 2015-08-27 23:05 GMT+03:00 Lars Engels <lars.engels@0x20.net>:
> > On Thu, Aug 27, 2015 at 11:00:44AM -0400, Allan Jude wrote:
> >> On 2015-08-27 09:21, Pavel Timofeev wrote:
> >> > IMO such tools would be useful even for ansible/puppet and friends.
> >> > Not just for users ;)
> >> >
> >>
> >> Teaching service to use sysrc might be useful. Making sysrc detect tha=
t
> >> /etc/rc.conf.d/<service> exists, and use it, else fallback to
> >> /etc/rc.conf might also be nice.
> >>
> >> service mysql-server enable|disable
> >>       sets mysql_enable=3D"YES|NO"
> >> service mysql-server set datadir=3D/var/db/mysql
> >>       sets mysql_datadir=3D"/var/db/mysql"
> >
> > There's already a patch in phabricator:
> >
> > https://reviews.freebsd.org/D451
>
> Great!
> The supported features and syntax should be discussed more.
> For example, it can't set rcopts, just print them, as I can see.
> And I disagree with bapt@ and bdrewery@.
> IMO default place should be /etc/rc.conf. This behaviour could be
> controlled by some key. You already introduced '-s' key there. I like
> it!
> Finally, If a $service rcopts are already set in some file, this tool
> should use that file to supplement them.
>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAAoTqfvHfZpdE7QcVGx_BWabdXN68XOGWOcJM33VoKfR7j6Dhw>