Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Aug 2015 11:58:34 +0300
From:      Pavel Timofeev <timp87@gmail.com>
To:        Lars Engels <lars.engels@0x20.net>
Cc:        Allan Jude <allanjude@freebsd.org>, freebsd-hackers@freebsd.org,  Devin Teske <dteske@freebsd.org>
Subject:   Re: How to control and setup service?
Message-ID:  <CAAoTqfthyGatRokfv-umxjxNp3Qj9xE7A7veDFjQE%2B0PNUdDcA@mail.gmail.com>
In-Reply-To: <20150827200534.GH16003@e-new.0x20.net>
References:  <CAAoTqfvxUznJp%2BtguAaYQ=5HfKXTG%2BGxY644wvqm4e9=E8WuHw@mail.gmail.com> <55DF261C.80009@freebsd.org> <20150827200534.GH16003@e-new.0x20.net>

next in thread | previous in thread | raw e-mail | index | archive | help
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 that
>> /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="YES|NO"
>> service mysql-server set datadir=/var/db/mysql
>>       sets mysql_datadir="/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?CAAoTqfthyGatRokfv-umxjxNp3Qj9xE7A7veDFjQE%2B0PNUdDcA>