From fbc84a6219d5d9b5d6f9493e17fa46d9513adf92 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 01d4319..fa231ec 100644 --- a/smeserver-fail2ban.spec +++ b/smeserver-fail2ban.spec @@ -53,6 +53,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