mirror of https://github.com/fail2ban/fail2ban
d/post{inst,rm},preinst: Remove code for ancient versions
`postinst`, `postrm` and `preinst` contain code related to adjustments to be done when upgrading from versions older than 0.7.1, 0.8.13, etc. This code has not been run for a long time, considering that old-old-stable (Debian 9, 2017) shipped with version 0.9.6-2. It can thus be removed.debian
parent
77c2b8b6ec
commit
dcfe899716
|
@ -1,3 +0,0 @@
|
||||||
# it is in a comment...
|
|
||||||
fail2ban: read-in-maintainer-script [postinst:41]
|
|
||||||
|
|
|
@ -16,7 +16,6 @@ set -e
|
||||||
# for details, see http://www.debian.org/doc/debian-policy/ or
|
# for details, see http://www.debian.org/doc/debian-policy/ or
|
||||||
# the debian-policy package
|
# the debian-policy package
|
||||||
#
|
#
|
||||||
preversion=$2
|
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
configure)
|
configure)
|
||||||
|
@ -27,48 +26,7 @@ case "$1" in
|
||||||
touch $LOG
|
touch $LOG
|
||||||
chown root:adm ${LOG}* || true
|
chown root:adm ${LOG}* || true
|
||||||
chmod 640 ${LOG}* || true
|
chmod 640 ${LOG}* || true
|
||||||
|
;;
|
||||||
# Note regarding changed configuration file
|
|
||||||
# Note regarding changed configuration file
|
|
||||||
if [ ! -z $preversion ]; then
|
|
||||||
if dpkg --compare-versions $preversion lt 0.7.1-1; then
|
|
||||||
cat <<EOF
|
|
||||||
WARNING!
|
|
||||||
|
|
||||||
Fail2ban 0.7 is a complete rewrite of the 0.6 version, and if you
|
|
||||||
customized any of provided configuration or startup files
|
|
||||||
(/etc/default/fail2ban, /etc/fail2ban.conf, /etc/init.d/fail2ban), please
|
|
||||||
read relevant entry in /usr/share/doc/fail2ban/NEWS.Debian.gz.
|
|
||||||
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
if dpkg --compare-versions $preversion lt 0.5.4-5.14; then
|
|
||||||
cat <<EOF
|
|
||||||
WARNING!
|
|
||||||
|
|
||||||
Configuration file /etc/fail2ban.conf, failregex configuration
|
|
||||||
parameter specifically, were changed in 0.5.4-5 to close reported
|
|
||||||
security breach, and in 0.5.4-5.14 to close few other bugs.
|
|
||||||
|
|
||||||
updating from <0.5.4-5
|
|
||||||
Unless configuration file (or corresponding failregex'es) gets updated,
|
|
||||||
security breach is not closed and corresponding warning will be reported
|
|
||||||
by the fail2ban (in the log files).
|
|
||||||
|
|
||||||
updating from <0.5.4-5.14
|
|
||||||
Bugs #329163, #331695 dealing with changed iptables rules
|
|
||||||
outside of fail2ban were fixed in 0.5.4-5.14, and require upgrade of the
|
|
||||||
configuration file (fwcheck option was introduced) to take full
|
|
||||||
advantage of the problem solution (otherwise some problems might
|
|
||||||
persist)
|
|
||||||
|
|
||||||
Please review the configuration file and make appropriate changes.
|
|
||||||
ENJOY!
|
|
||||||
|
|
||||||
EOF
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
;;
|
|
||||||
|
|
||||||
abort-upgrade|abort-remove|abort-deconfigure)
|
abort-upgrade|abort-remove|abort-deconfigure)
|
||||||
|
|
||||||
|
@ -80,17 +38,6 @@ EOF
|
||||||
;;
|
;;
|
||||||
esac
|
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~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/lighttpd-fastcgi.conf /etc/fail2ban/filter.d/suhosin.conf 0.8.13-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/sasl.conf /etc/fail2ban/filter.d/postfix-sasl.conf 0.8.13-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/couriersmtp.conf /etc/fail2ban/filter.d/courier-smtp.conf 0.9.0-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/courierlogin.conf /etc/fail2ban/filter.d/courier-auth.conf 0.9.0-1~ -- "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
|
||||||
# generated by other debhelper scripts.
|
|
||||||
|
|
||||||
#DEBHELPER#
|
#DEBHELPER#
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -36,14 +36,6 @@ case "$1" in
|
||||||
;;
|
;;
|
||||||
esac
|
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~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/lighttpd-fastcgi.conf /etc/fail2ban/filter.d/suhosin.conf 0.8.13-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/sasl.conf /etc/fail2ban/filter.d/postfix-sasl.conf 0.8.13-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/couriersmtp.conf /etc/fail2ban/filter.d/courier-smtp.conf 0.9.0-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/courierlogin.conf /etc/fail2ban/filter.d/courier-auth.conf 0.9.0-1~ -- "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# dh_installdeb will replace this with shell code automatically
|
# dh_installdeb will replace this with shell code automatically
|
||||||
# generated by other debhelper scripts.
|
# generated by other debhelper scripts.
|
||||||
|
|
||||||
|
|
|
@ -1,15 +0,0 @@
|
||||||
#!/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~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/lighttpd-fastcgi.conf /etc/fail2ban/filter.d/suhosin.conf 0.8.13-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/sasl.conf /etc/fail2ban/filter.d/postfix-sasl.conf 0.8.13-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/couriersmtp.conf /etc/fail2ban/filter.d/courier-smtp.conf 0.9.0-1~ -- "$@"
|
|
||||||
dpkg-maintscript-helper mv_conffile /etc/fail2ban/filter.d/courierlogin.conf /etc/fail2ban/filter.d/courier-auth.conf 0.9.0-1~ -- "$@"
|
|
||||||
fi
|
|
||||||
|
|
||||||
#DEBHELPER#
|
|
||||||
|
|
||||||
exit 0
|
|
Loading…
Reference in New Issue