Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 9 Sep 2015 15:26:05 +0200
From:      Lars Engels <lme@freebsd.org>
To:        Allan Jude <allanjude@freebsd.org>
Cc:        freebsd-hackers@freebsd.org
Subject:   Re: How to control and setup service?
Message-ID:  <20150909132605.GP16003@e-new.0x20.net>
In-Reply-To: <55EDBD63.6060600@freebsd.org>
References:  <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> <55EDBD63.6060600@freebsd.org>

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

--RtGa12sjXv8gVUZO
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

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@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 y=
ou.
> >>>> 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 su=
re
> >>>> that no other rcvars are set.
> >>>>
> >>>> Before you came it was:
> >>>> mysql_enable=3D"YES/NO" # no matter
> >>>> mysql_datadir=3D"/mycozystorage/db/mysql"
> >>>> mysql_defaults_extra_file=3D"/mycozystorage/mysql/my.cnf"
> >>>> mysql_plugin_dir=3D"/somewhere/lib/mysql/plugin"
> >>>> mysql_log_error=3D"/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=3D"YES"
> >>>> mysql_datadir=3D"/mysqldb"
> >>>> mysql_log_error=3D"/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 overloadi=
ng
> >>> the "set" operation.
> >>
> >> BTW, it's already suggested here https://reviews.freebsd.org/D451
> >> it's rcdelete. Not sure if it's good name.
> >>
> >=20
> > Back from holidays...
> >=20
> > 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:
> >=20
> > 1 /etc/rc.conf
> > 2 /etc/rc.conf.local
> > 3 /etc/rc.conf.d/$servicename
> >=20
> > I could add some flags to service(8), e.g. -l to edit rc.conf.local, -d
> > for /etc/rc.conf.d.
> >=20
> > But please don't let the review rot any longer. :)
> >=20
> >=20
>=20
> 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 rotti=
ng.

Yes, I saw that you sent an updated patch for review. Thanks!

--RtGa12sjXv8gVUZO
Content-Type: application/pgp-signature

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iQF8BAEBCgBmBQJV8DNsXxSAAAAAAC4AKGlzc3Vlci1mcHJAbm90YXRpb25zLm9w
ZW5wZ3AuZmlmdGhob3JzZW1hbi5uZXQ4RjQwMDE3RTRERjUzMTI1N0FGRTUxNDlF
NTRDQjM3RDNBMDg5RDZEAAoJEOVMs306CJ1toF8H/i9wvTfIVnM7dsUUxaKyOYIa
AO0D4EbngMl1LbegSxWrRzZGdFnBH+IFb9phJLKOIjM5kdsxNVzUjBIJKj63u3h9
SHNdBxE28pjDbQeC81SfBio5klIp8HL7NuPy+0xpik6j0vGj/q84P5T6EK00nHgq
QsuPNylbvS9MT21g1bKzKuFHuElnOUECIClzZRLbZIboGzHPE78vqaML3hI01nNc
uBxOZMCzP+FVJgxjxkatkPRJLJuLYmNtniHdSqadAiHSdYbxV2AsCt7IxFqd9tHl
nEuERX09W03IJABjqF6N6tkPerxyDHkTJ6bw5Z18NQ3qY0fCkImaPeraPREdhww=
=I7KZ
-----END PGP SIGNATURE-----

--RtGa12sjXv8gVUZO--



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