Port deletes .conf file on update
Jeremy Chadwick
koitsu at FreeBSD.org
Mon Jan 1 21:27:12 PST 2007
On Mon, Jan 01, 2007 at 07:56:12PM -0900, Beech Rintoul wrote:
> ftp/proftpd deletes /usr/local/etc/proftpd.conf when updating. I thought I had
> it fixed, but it continues to delete the config. Here's the section in the
> makefile:
>
> post-install:
> [ -f ${PREFIX}/etc/proftpd.conf ] || \
> ${CP} ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf.sample
>
> ...
>
> It creates proftpd.conf.sample properly, but then deletes proftpd.conf. BTW
> proftpd.conf is not in the pkg-plist.
>
> How do I fix this?
My guess is that the actual proftpd Makefile (not the port Makefile)
is doing something during "make install" which nukes the existing
proftpd.conf in PREFIX/etc.
Logically your Makefile sh code looks like it should do exactly what
you intend it (copy the EXAMPLESDIR configuration to etc as .sample
if the test(1) returns a non-zero exit code).
I assume it still breaks if you change the above sh code to the
following?
if [ ! -f ${PREFIX}/etc/proftpd.conf ]
then
${CP} ${EXAMPLESDIR}/etc/proftpd.conf ${PREFIX}/etc/proftpd.conf.sample
fi
--
| Jeremy Chadwick jdc at parodius.com |
| Parodius Networking http://www.parodius.com/ |
| UNIX Systems Administrator Mountain View, CA, USA |
| Making life hard for others since 1977. PGP: 4BD6C0CB |
More information about the freebsd-ports
mailing list