From: Florian Forster Date: Sun, 9 Jul 2006 09:21:31 +0000 (+0200) Subject: Don't overwrite an existing config file. Use `collectd.conf.pkg-orig' instead. X-Git-Tag: collectd-3.10.0~9^2~1 X-Git-Url: https://git.verplant.org/?a=commitdiff_plain;h=8efaf95cec212b9c79e3579fc821e2acbee96486;p=collectd.git Don't overwrite an existing config file. Use `collectd.conf.pkg-orig' instead. --- diff --git a/Makefile.am b/Makefile.am index 7dda784e..dee72e70 100644 --- a/Makefile.am +++ b/Makefile.am @@ -8,6 +8,5 @@ dist-hook: find $(distdir) -type d -name '.svn' | xargs rm -rf install-exec-hook: - $(mkinstalldirs) $(DESTDIR)$(sysconfdir) $(mkinstalldirs) $(DESTDIR)$(localstatedir)/run $(mkinstalldirs) $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME) diff --git a/src/Makefile.am b/src/Makefile.am index a93045ed..46d1a69c 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -374,8 +374,6 @@ collectd_LDADD += "-dlopen" wireless.la collectd_DEPENDENCIES += wireless.la endif -sysconf_DATA = collectd.conf - dist_man_MANS = collectd.1 collectd.conf.5 #collectd_1_SOURCES = collectd.pod @@ -386,3 +384,12 @@ dist_man_MANS = collectd.1 collectd.conf.5 .pod.5: pod2man --section=5 --release=$(VERSION) --center=$(PACKAGE) $< >$@ + +install-exec-hook: + $(mkinstalldirs) $(DESTDIR)$(sysconfdir) + if test -e $(DESTDIR)$(sysconfdir)/collectd.conf; \ + then \ + $(INSTALL_DATA) collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf.pkg-orig; \ + else \ + $(INSTALL_DATA) collectd.conf $(DESTDIR)$(sysconfdir)/collectd.conf; \ + fi