From 1d23a4dc4fede8c0095472bfc3fbe317715a55b1 Mon Sep 17 00:00:00 2001 From: Yaroslav Halchenko Date: Wed, 19 Mar 2014 10:26:07 -0400 Subject: [PATCH] debian/post{inst,rm},preinst: - [thanks to Daniel Schaal]: take care about renaming firewall-cmd-direct-new.conf to firewallcmd-new.conf which happened in 0.8.11-29-g56b6bf7 --- debian/changelog | 4 ++++ debian/postinst | 4 ++++ debian/postrm | 4 ++++ debian/preinst | 11 +++++++++++ 4 files changed, 23 insertions(+) create mode 100755 debian/preinst diff --git a/debian/changelog b/debian/changelog index eb21d9f3..59727991 100644 --- a/debian/changelog +++ b/debian/changelog @@ -6,6 +6,10 @@ fail2ban (0.8.13-1) unstable; urgency=low - new jail definitions: apache-modsecurity, apache-nohome, freeswitch, ejabberd-auth, ssh-blocklist, nagios - new configuration option: ignorecommand + * debian/post{inst,rm},preinst: + - [thanks to Daniel Schaal]: take care about renaming + - firewall-cmd-direct-new.conf to firewallcmd-new.conf which happened + in 0.8.11-29-g56b6bf7 -- Yaroslav Halchenko Tue, 18 Mar 2014 23:13:35 -0400 diff --git a/debian/postinst b/debian/postinst index 885d39aa..47d60cb9 100755 --- a/debian/postinst +++ b/debian/postinst @@ -80,6 +80,10 @@ EOF ;; esac +if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then + dpkg-maintscript-helper mv_conffile /etc/fail2ban/action.d/firewall-cmd-direct-new.conf /etc/fail2ban/action.d/firewallcmd-new.conf 0.8.13-1~ -- "$@" +fi + # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. diff --git a/debian/postrm b/debian/postrm index 1e6c5ccd..e53e4e45 100755 --- a/debian/postrm +++ b/debian/postrm @@ -34,6 +34,10 @@ case "$1" in ;; esac +if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then + dpkg-maintscript-helper mv_conffile /etc/fail2ban/action.d/firewall-cmd-direct-new.conf /etc/fail2ban/action.d/firewallcmd-new.conf 0.8.13-1~ -- "$@" +fi + # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. diff --git a/debian/preinst b/debian/preinst new file mode 100755 index 00000000..f819c3c2 --- /dev/null +++ b/debian/preinst @@ -0,0 +1,11 @@ +#!/bin/sh + +set -e + +if dpkg-maintscript-helper supports mv_conffile 2>/dev/null; then + dpkg-maintscript-helper mv_conffile /etc/fail2ban/action.d/firewall-cmd-direct-new.conf /etc/fail2ban/action.d/firewallcmd-new.conf 0.8.13-1~ -- "$@" +fi + +#DEBHELPER# + +exit 0