From db51ffa70800708b1cdf3a69f87e0284cbc1f94d Mon Sep 17 00:00:00 2001 From: Alison Chaiken Date: Sun, 3 Jan 2016 00:09:33 -0800 Subject: [PATCH] Amend logwatch Makefile.in to work with alternative file. Bug #2187 locations Recent distro releases may place logwatch's configuration files in different locations. Improve the Makefile.in by testing for the actual location of the files. --- bacula/scripts/logwatch/Makefile.in | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/bacula/scripts/logwatch/Makefile.in b/bacula/scripts/logwatch/Makefile.in index 1ecb7dd4b3..ae94edbe98 100644 --- a/bacula/scripts/logwatch/Makefile.in +++ b/bacula/scripts/logwatch/Makefile.in @@ -6,20 +6,27 @@ # 08 Jan 2005 D. Scott Barninger # -SYSCONFDIR=/etc/log.d +ifeq ("$(shell test -d /etc/log.d)",0) + SYSCONFDIR=/etc/log.d + SCRIPTDIR=/etc/log.d +else + SYSCONFDIR=/etc/logwatch + SCRIPTDIR=/usr/share/logwatch +endif + INSTALL=@INSTALL@ all: install install: - $(INSTALL) -m 755 bacula $(DESTDIR)$(SYSCONFDIR)/scripts/services/bacula - $(INSTALL) -m 755 applybaculadate $(DESTDIR)$(SYSCONFDIR)/scripts/shared/applybaculadate + $(INSTALL) -m 755 bacula $(DESTDIR)$(SCRIPTDIR)/scripts/services/bacula + $(INSTALL) -m 755 applybaculadate $(DESTDIR)$(SCRIPTDIR)/scripts/shared/applybaculadate $(INSTALL) -m 644 logfile.bacula.conf $(DESTDIR)$(SYSCONFDIR)/conf/logfiles/bacula.conf $(INSTALL) -m 644 services.bacula.conf $(DESTDIR)$(SYSCONFDIR)/conf/services/bacula.conf uninstall: - rm -f $(DESTDIR)$(SYSCONFDIR)/scripts/services/bacula - rm -f $(DESTDIR)$(SYSCONFDIR)/scripts/shared/applybaculadate + rm -f $(DESTDIR)$(SCRIPTDIR)/scripts/services/bacula + rm -f $(DESTDIR)$(SCRIPTDIR)/scripts/shared/applybaculadate rm -f $(DESTDIR)$(SYSCONFDIR)/conf/logfiles/bacula.conf rm -f $(DESTDIR)$(SYSCONFDIR)/conf/services/bacula.conf -- 2.39.5