From b1266e43c8a49d6d040192a0ccc2a662842f9806 Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Fri, 17 Feb 2012 13:46:10 +0100 Subject: [PATCH] izbacen if uvjet u postinstu --- debian/changelog | 6 ++++++ debian/postinst | 33 +++++++++++++++------------------ 2 files changed, 21 insertions(+), 18 deletions(-) diff --git a/debian/changelog b/debian/changelog index 4c4462e..2bd5159 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +vsftpd-cn (2.3.2-2) stable; urgency=low + + * Izbacen if uvjet u postinstu + + -- Ivan Rako Fri, 17 Feb 2012 13:45:51 +0100 + vsftpd-cn (2.3.2-1) stable; urgency=low * prva verzija za squeeze diff --git a/debian/postinst b/debian/postinst index 503f0e0..3dbc963 100755 --- a/debian/postinst +++ b/debian/postinst @@ -8,28 +8,25 @@ set -e # Load CARNet functions . /usr/share/carnet-tools/functions.sh -if dpkg --compare-versions "$2" lt 2.0.5-2; then +cp_check_and_sed '^#anonymous_enable=YES' \ + 's/^#anonymous_enable=YES/anonymous_enable=NO/g' \ + /etc/vsftpd.conf && restart="yes" || true - cp_check_and_sed '^#anonymous_enable=YES' \ - 's/^#anonymous_enable=YES/anonymous_enable=NO/g' \ - /etc/vsftpd.conf && restart="yes" || true +cp_check_and_sed '^anonymous_enable=YES' \ + 's/^anonymous_enable=YES/anonymous_enable=NO/g' \ + /etc/vsftpd.conf && restart="yes" || true - cp_check_and_sed '^anonymous_enable=YES' \ - 's/^anonymous_enable=YES/anonymous_enable=NO/g' \ - /etc/vsftpd.conf && restart="yes" || true +cp_check_and_sed '#local_enable=YES' \ + 's/#local_enable=YES/local_enable=YES/g' \ + /etc/vsftpd.conf && restart="yes" || true - cp_check_and_sed '#local_enable=YES' \ - 's/#local_enable=YES/local_enable=YES/g' \ - /etc/vsftpd.conf && restart="yes" || true +cp_check_and_sed '#write_enable=YES' \ + 's/#write_enable=YES/write_enable=YES/g' \ + /etc/vsftpd.conf && restart="yes" || true - cp_check_and_sed '#write_enable=YES' \ - 's/#write_enable=YES/write_enable=YES/g' \ - /etc/vsftpd.conf && restart="yes" || true - - cp_check_and_sed '^#local_umask=' \ - 's/#local_umask=.*$/local_umask=022/g' \ - /etc/vsftpd.conf && restart="yes" || true -fi +cp_check_and_sed '^#local_umask=' \ + 's/#local_umask=.*$/local_umask=022/g' \ + /etc/vsftpd.conf && restart="yes" || true # restart if needed [ "$restart" = "yes" ] || exit 0 -- 1.7.10.4