From: Dinko Korunic Date: Sun, 24 Apr 2011 15:12:47 +0000 (+0200) Subject: - pravilniji regex.. X-Git-Tag: v0.8.5~4 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=1b75f226e6ddf2cea7543466672afc6caf6db847;p=fail2ban-cn.git - pravilniji regex.. --- diff --git a/debian/postinst b/debian/postinst index 19a2436..f404e47 100755 --- a/debian/postinst +++ b/debian/postinst @@ -34,7 +34,7 @@ CONF=/etc/fail2ban/jail.conf if [ -e "$CONF" ]; then # enable ssh, pam-generic, sasl, proftpd and vsftpd service - perl -ne 'if (/\[(ssh|pam-generic|sasl|proftpd|vsftpd)\]/ .. /enabled/) { $_ =~ s/enabled = false/enabled = true/gi }; print $_' "$CONF" > "$CONF.$$" && \ + perl -ne 'if (/\[(ssh|pam-generic|sasl|proftpd|vsftpd)\]/ .. /enabled/) { $_ =~ s/^enabled\s=\sfalse/enabled = true/gi }; print $_' "$CONF" > "$CONF.$$" && \ cp_mv "$CONF.$$" "$CONF" rm -f "$CONF.$$"