From 8f9f7ba6558657a542fe3711ba092fdc7c1f336b Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Mon, 23 Jun 2014 21:37:41 +0200 Subject: [PATCH] Pre-create fail2ban log file so it can start the first time Needed on EL6 version of fail2ban --- createlinks | 2 ++ smeserver-fail2ban.spec | 1 + 2 files changed, 3 insertions(+) diff --git a/createlinks b/createlinks index 0111a40..a921919 100644 --- a/createlinks +++ b/createlinks @@ -18,6 +18,8 @@ safe_symlink("restart", "root/etc/e-smith/events/network-create/services2adjust/ safe_symlink("restart", "root/etc/e-smith/events/network-delete/services2adjust/fail2ban"); safe_symlink("restart", "root/etc/e-smith/events/remoteaccess-update/services2adjust/fail2ban"); +safe_touch("root/var/log/fail2ban/daemon.log"); + service_link_enhanced("fail2ban", "S92", "7"); service_link_enhanced("fail2ban", "K08", "6"); service_link_enhanced("fail2ban", "K08", "0"); diff --git a/smeserver-fail2ban.spec b/smeserver-fail2ban.spec index 7b7ad27..3411541 100644 --- a/smeserver-fail2ban.spec +++ b/smeserver-fail2ban.spec @@ -54,6 +54,7 @@ perl createlinks /bin/rm -f %{name}-%{version}-filelist /sbin/e-smith/genfilelist $RPM_BUILD_ROOT \ --dir /var/log/fail2ban 'attr(0750,root,root)' \ + --file /var/log/fail2ban/daemon.log 'config(noreplace) %attr(0600,root,root)' \ --file /etc/cron.daily/cleanup_fail2ban 'attr(0755,root,root)' \ > %{name}-%{version}-filelist