Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 03 Jan 2013 22:35:36 +0000
From:      Matthew Seaman <matthew@FreeBSD.org>
To:        Oleg Moskalenko <oleg.moskalenko@citrix.com>
Cc:        "freebsd-ports@freebsd.org" <freebsd-ports@freebsd.org>
Subject:   Re: What is policy about auto-editing config files on port install / deinstall?
Message-ID:  <50E607B8.10302@FreeBSD.org>
In-Reply-To: <031222CBCF33214AB2EB4ABA279428A3012CA8FA98EF@SJCPMAILBOX01.citrite.net>
References:  <50E49A73.2070008@quip.cz> <CACdU%2Bf9WKAsLZHqHMZKtgGoBRL%2BR9do0qfTL0d_c_8_e6Tb4bw@mail.gmail.com> <50E5FCDA.80906@quip.cz> <031222CBCF33214AB2EB4ABA279428A3012CA8FA98EF@SJCPMAILBOX01.citrite.net>

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

On 03/01/2013 22:14, Oleg Moskalenko wrote:
> So, what is the general recommended policy on the network services
> ports in regard to /etc/rc.conf file ? If I install a port that
> creates a service "foodbank", then which choice is better:
>=20
> 1) "Automatically" edit /etc/rc.conf in the port installation script
> to include the line: foodbank_enable=3D"YES",
>=20
> or:
>=20
> 2) Display a message to the user like "you must edit /etc/rc.conf to
> add line foodbank=3DYES file" ?
>=20
> The same question applies to the port de-installation.

That's a rather different question to the original.

In this case, the policy is clear: always choice 2 -- advise the admin
about what to do, where necessary.  Installing a port does not reliably
imply intent to run it as a service and hence automatically enabling it
in rc.conf is simply wrong.

Although adding 'foodbank_enable=3D"YES"' to /etc/rc.conf is such a
routine action that you probably don't really need to mention it.

The original question was more along the lines of 'should installing or
deinstalling the port mean automatically editing
/usr/local/etc/foodbank.conf ?'

Well, maybe.

Editing the port on deinstall only makes sense if there are several
different ported applications that all use the same configuration file.
 Otherwise, there's no point editing the config file, since deleting the
port means there's nothing left to read it.  The classic example of
automatically editing a config file occurs with httpd.conf when
installing/deinstalling apache modules.  That fulfils the multiple ports
using the same config file criterion in an exemplary way.

Customising a config file used exclusively by one port at install time
(but only if there isn't a pre-existing config file) is more of a grey
area.  On the whole ports tend not to do this, citing the 'Tools not
Policy' mantra.  But I don't think it is actually forbidden.

	Cheers,

	Matthew

--=20
Dr Matthew J Seaman MA, D.Phil.
PGP: http://www.infracaninophile.co.uk/pgpkey



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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG/MacGPG2 v2.0.16 (Darwin)
Comment: Using GnuPG with undefined - http://www.enigmail.net/

iEYEARECAAYFAlDmB7gACgkQ8Mjk52CukIwlUQCfWWERwvvW8c4daELLBVLDX4e1
sIQAn0+9pT5YRHCXsJqwupwhPgFaVhlJ
=OHSA
-----END PGP SIGNATURE-----

--------------enig78CE26371860F919D9A28C75--



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