Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 29 Aug 2015 11:05:17 -0400
From:      Allan Jude <allanjude@freebsd.org>
To:        freebsd-hackers@freebsd.org
Subject:   Re: How to control and setup service?
Message-ID:  <55E1CA2D.5020203@freebsd.org>
In-Reply-To: <55E1803E.7080706@freebsd.org>
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>

next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156)
--StKRpSrtvQEjTk7udVAxIiN1p6gjTDStU
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: quoted-printable

On 2015-08-29 05:49, Stefan Esser wrote:
> 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=
=2E
>> 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=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.
>=20
> I think that the removal of the previous config state should not come
> as the side-effect of some "set" command.
>=20
> 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.
>=20
> E.g.:
>=20
> # service mysql-server clearconfig
>=20
> Not sure about the best command name to use, it could also be "clean"
> or "initconfig" or "defaultconfig". The semantics is that all the
> rc.conf assignments for thise service are removed (including the
> enable line) and the defaults from defaults/rc.conf become effective
> again.
>=20
> Regards, STefan
> _______________________________________________
> freebsd-hackers@freebsd.org mailing list
> https://lists.freebsd.org/mailman/listinfo/freebsd-hackers
> To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.o=
rg"
>=20

I agree that that is a better design, as I would almost never actually
want to remove those extra settings, and if it happened unexpectedly, I
would be quite upset.

--=20
Allan Jude


--StKRpSrtvQEjTk7udVAxIiN1p6gjTDStU
Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (MingW32)

iQIcBAEBAgAGBQJV4coxAAoJEBmVNT4SmAt+hUAP/jcUpJzHnD2NiT7wQiXFc2+H
3KUtNzwc3UjDs5Xmw01iNJHZfrMcvltT4EgkaRuBIDE7h1JGrXJVuQ2fPmbRSLZw
n9usA+NCOAD9iCw80rhdW4jltuADJ7/1e7HIUTHjZIgo3AdDYFYMcCRdFWzUiKhk
1lkAdOCZdu5T6KkNdNWbvudTnls1BzR6rL3UA6R/5GN9LREHEFPhbx3Flm1vypIm
/fUR/e1NZu2uEdMTogmjv8qhikxSe80rx8UkMcJe10c2mNzvLsx7P4Ba0kiKgQcm
rR33wzTyJq4LmaVRkyzeckXIzBVAVkQTYo+5TCiLmG13J19SVynQWx1K+GeH2TbG
k6pOmCsdnyr2WUJq7Cturj/aeEFJiPJcs4QUfp8ucvw6UaJqBC8MRdjv3z3SD+Qz
UzYd6/s59nRENhvjtqm+HaSqnsolspQZbgSQzvLHznEPSPwIprk77Ra783Mxl7uL
5HYMzsM0HH5CztD9wIPhWMqGDiPUua869rg8bGBntXox1f6SpgZouKB5hB74JcyB
HxLOAqDHIfMhkE3LIufr1gBszx9l4liverTz9wmjxCL8VdASJXjNxDuOiRgtkwmq
WPlsyHPIpcpyuJqRT0SNYOOgbzVrsWxS2iAn1QbscoB3nqHrjow2fxFGuFIwVOLv
xhSldNonVCoz6jlCdETg
=MtgZ
-----END PGP SIGNATURE-----

--StKRpSrtvQEjTk7udVAxIiN1p6gjTDStU--



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