Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 7 Sep 2015 12:37:55 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to control and setup service?
Message-ID:  <55EDBD63.6060600@freebsd.org>
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>

index | next in thread | previous in thread | raw e-mail

[-- Attachment #1 --]
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@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.

-- 
Allan Jude


[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQIcBAEBAgAGBQJV7b1jAAoJEBmVNT4SmAt+N0EP/Rh5zXa5BDTDeEmThWYogJmq
NyfWco3Y3RGVgVcrP+QFHNdpIEyJfqWTTgqx5UYVm2xPQ9f6bx/Ovab8Oh2L7h1l
QnGA7L+6ifAdBb2AdWxCBGGRZ8qVXruYHeNCnSq9P1eUbJgVoDWy6xQvqmChogL8
xwtB2ww2YRbuF279abunaPzCMnm+QZYvWh2+tTyYRf3gUnDtsfrhTxCO3hhnVb3o
DYSxILDBedF1PMxMkPGepfrDqKaNzMiRhxbQicycnTrRIJlq972Xgci4WHpN/MMx
IGinVQpiRXCYe37KwIcZeYdX8q0dhu5SGhPZ1CBW5TmMWB+jSZgdUjTJRibPRu/y
yWUyD1vnWFmlzkt1szCbN7L/cs7SKYaW9UyLmCQFFwwzvrDRaLORy2YevPd+BVaQ
cTl1zyl9+TCndDfqAJxwJGM+XMTrqNbsSvNCdPUZCYQdgCSwgxUccYWA0z6SZVhK
+cz2HiMBlX9/UUibDY+YYclM+1K/6X06iDYR6FU4Rk0pNUT6hvww/jVo4LLbC4kU
q0l54at6xEwiO9tvCGqDtVPTvO5pVXw1Pl+L2gyf3yliB3wkcbT2cRhTXhgdP4B1
45Yi89nNXOlzOHbd4TzJxhWQKfP7scb4d94jW9dx8aeChWedsIbxzsrkFBFamf39
W1YbWxEP4iVOVigOX9en
=7Rwd
-----END PGP SIGNATURE-----
help

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