Date: Fri, 21 Nov 2014 23:48:39 +0100 From: Moritz Warning <moritzwarning@web.de> To: Scot Hetzel <swhetzel@gmail.com> Cc: FreeBSD Ports <ports@freebsd.org> Subject: Re: edit /etc/nsswitch.conf Message-ID: <546FC147.5050509@web.de> In-Reply-To: <CACdU%2Bf8vR1S3c191L8fBy2-FvTi6aDa4Li_TXxMWt9ArALoA8g@mail.gmail.com> References: <546FA26B.9030802@web.de> <CACdU%2Bf8vR1S3c191L8fBy2-FvTi6aDa4Li_TXxMWt9ArALoA8g@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 4880 and 3156) --On8XIbk03EHsj6AXUk0ttFoqIGXapAKdh Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable ok thanks, I did not know pkg-install. On 11/21/2014 11:39 PM, Scot Hetzel wrote: > On Fri, Nov 21, 2014 at 2:36 PM, Moritz Warning <moritzwarning@web.de> = wrote: >> Hi, >> >> I try to write a port of an application that needs to edit /etc/nsswit= ch.conf. >> But I have trouble modifying /etc/nsswitch.conf in pkg-plist (there is= where it should be done?). >> Even creating a test file in pkg-plist seem be ignored: >> >> /etc/testfile >> @exec echo 'test' >> /etc/testfile >> >> Any ideas what could be wrong? >> > You probably don't want to do this in the pkg-plist, instead you would > normally do this in pkg-install: >=20 >=20 > pkg-install > #!/bin/sh >=20 > PKG_BATCH=3D${BATCH:=3DNO} > PKG_PREFIX=3D${PKG_PREFIX:=3D/usr/local} >=20 > case $2 in > POST-INSTALL) > if [ "${PKG_BATCH}" =3D "NO" ]; t= hen > # Do something to add an > entry to /etc/nsswitch.conf > else > # Display a message > echo "*** We do not modify > /etc/nsswitch.conf automatically in" > echo "*** BATCH mode. Please > modify it yourself." > fi > ;; > POST-DEINSTALL) > # Do something to remove the > entry that was added to /etc/nsswitch.conf > ;; > esac >=20 > It might be better to add a pkg-message to the port that shows how to > modify /etc/nsswitch.conf, instead of having the port modify it. >=20 --On8XIbk03EHsj6AXUk0ttFoqIGXapAKdh Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBCAAGBQJUb8FKAAoJECHrh56PP4wpy7UIAJXDIuA0loL5EeQw0MfTQXlq nqyULN2JQaL9YlcHuIwxSw77uAaqQX/GKJ6P8MZN+FPoINe2AH0drRe2548Kc4Lc u65FKV08Yv8Ar6lE/ti2NnIPtz82jGvUtXXtlk6/EivNzX+tLk5ih4xGOzjpg80D i4cGqk4v0hP445Zt9UQNCMDM1dj2n9wQGaGDLwddTtN89XJXYCT4e72/pvkcbgkA 4qN/CLEDL0KDYf/cKc9NDKqDBVpqEGC1GHy1sVRDViM1soc4ZRLkvrKIpzV9S7l3 i2kEmua1Nb7/hfd3v4J1DR27NxMW4cDP/y1189GQuGu/O+JdkIz165HxO2iSmWs= =rpOm -----END PGP SIGNATURE----- --On8XIbk03EHsj6AXUk0ttFoqIGXapAKdh--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?546FC147.5050509>