From owner-freebsd-hackers@freebsd.org Wed Sep 9 13:26:09 2015 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 3F45A9CCD34 for ; Wed, 9 Sep 2015 13:26:09 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from mail.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.0x20.net", Issuer "mail.0x20.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id C604B1B83; Wed, 9 Sep 2015 13:26:08 +0000 (UTC) (envelope-from lars@e-new.0x20.net) Received: from e-new.0x20.net (mail.0x20.net [IPv6:2001:aa8:fffb:1::3]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by mail.0x20.net (Postfix) with ESMTPS id B11606DF91B; Wed, 9 Sep 2015 15:26:05 +0200 (CEST) Received: from e-new.0x20.net (localhost [127.0.0.1]) by e-new.0x20.net (8.14.7/8.14.7) with ESMTP id t89DQ5pc055275; Wed, 9 Sep 2015 15:26:05 +0200 (CEST) (envelope-from lars@e-new.0x20.net) Received: (from lars@localhost) by e-new.0x20.net (8.14.7/8.14.7/Submit) id t89DQ5tf055087; Wed, 9 Sep 2015 15:26:05 +0200 (CEST) (envelope-from lars) Date: Wed, 9 Sep 2015 15:26:05 +0200 From: Lars Engels To: Allan Jude Cc: freebsd-hackers@freebsd.org Subject: Re: How to control and setup service? Message-ID: <20150909132605.GP16003@e-new.0x20.net> References: <20150827200534.GH16003@e-new.0x20.net> <55E086D3.1040700@freebsd.org> <55E1803E.7080706@freebsd.org> <20150907104458.GL16003@e-new.0x20.net> <55EDBD63.6060600@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="RtGa12sjXv8gVUZO" Content-Disposition: inline In-Reply-To: <55EDBD63.6060600@freebsd.org> X-Editor: VIM - Vi IMproved 7.4 X-Operation-System: FreeBSD 8.4-RELEASE-p23 User-Agent: Mutt/1.5.23 (2014-03-12) X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 09 Sep 2015 13:26:09 -0000 --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 : > >>> 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--