From: Dinko Korunic Date: Sat, 2 Apr 2011 14:12:19 +0000 (+0200) Subject: - ispravke razlicitih Lintian gresaka, kao logike (registriranje X-Git-Tag: v2.6.4-1~2 X-Git-Url: http://ftp.carnet.hr/carnet-debian/scm?a=commitdiff_plain;h=3e2fe4efa8e02d92b12a7c0f8a3c62c4f35d832e;p=amavisd-cn.git - ispravke razlicitih Lintian gresaka, kao logike (registriranje amavisd-cn init skripte mjesto amavis skripte i vracanje nakon deinstalacije paketa) --- diff --git a/debian/changelog b/debian/changelog index 207d736..d16e839 100644 --- a/debian/changelog +++ b/debian/changelog @@ -2,6 +2,8 @@ amavisd-cn (3:2.6.4-1) stable; urgency=low * #23256: insserv i init skripta * vise se ne koristi /etc/init.d/amavis, vec samo /etc/init.d/amavisd-cn + * ispravke razlicitih Lintian gresaka, kao logike (registriranje amavisd-cn + init skripte mjesto amavis skripte i vracanje nakon deinstalacije paketa) -- Dinko Korunic Sat, 02 Apr 2011 12:28:15 +0200 @@ -189,7 +191,7 @@ amavisd-cn (2:20030616p10-1) testing; urgency=low * chown datoteka u slucaju upgradea sa woodyja. * Dodavanje grupe amavis ako je potrebno. - -- Zeljko Boros + -- Zeljko Boros Wed, 24 Mar 2004 10:26:51 +0100 amavisd-cn (20030616p7-3) testing; urgency=low diff --git a/debian/conffiles b/debian/conffiles index e69de29..d8ebbc6 100644 --- a/debian/conffiles +++ b/debian/conffiles @@ -0,0 +1 @@ +/etc/init.d/amavisd-cn diff --git a/debian/control b/debian/control index a843ebe..1d65bad 100644 --- a/debian/control +++ b/debian/control @@ -8,7 +8,7 @@ Standards-Version: 3.9.1 Package: amavisd-cn Architecture: all Provides: amavisd-new-cn -Depends: amavisd-new (>= 1:2.6.4-3), postfix, clamav-cn (>= 3:0.94-5), spamassassin-cn (>= 2:3.2.5-6), debianutils, carnet-tools-cn (>= 2.8.1), procps, arj | unarj, rar | unrar | unrar-free, zoo, nomarch, cpio, lzop, cabextract, zip, unzip, bzip2 +Depends: amavisd-new (>= 1:2.6.4-3), postfix, clamav-cn (>= 3:0.94-5), spamassassin-cn (>= 2:3.2.5-6), debianutils (>= 3.4), carnet-tools-cn (>= 2.8.1), procps, arj | unarj, rar | unrar | unrar-free, zoo, nomarch, cpio, lzop, cabextract, zip, unzip, bzip2 Pre-Depends: amavisd-new (>= 1:2.6.4-3) Recommends: postfix-cn Conflicts: libsavi-perl (<< 0.15), bunch-perl-modules-cn diff --git a/debian/init b/debian/init index b689825..3f1b26a 100755 --- a/debian/init +++ b/debian/init @@ -131,11 +131,23 @@ case "$arg" in istart) start clamd start amavis - /etc/init.d/$mta start + if [ -x "/etc/init.d/$mta" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d $mta start + else + /etc/init.d/$mta start + fi + fi ;; istop) - /etc/init.d/$mta stop + if [ -x "/etc/init.d/$mta" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d $mta stop + else + /etc/init.d/$mta stop + fi + fi stop amavis stop clamd ;; diff --git a/debian/postinst b/debian/postinst index ee3f156..56a0755 100755 --- a/debian/postinst +++ b/debian/postinst @@ -110,26 +110,60 @@ fi # kill naughty pyzor descendants -- XXX needed for 2.4 or not? if dpkg --compare-versions "$2" lt 2:20030616p10-7 && \ - pgrep -u amavis -f '/usr/bin/pyzor check' > /dev/null; then - /etc/init.d/amavisd-cn stop + pgrep -u amavis -f '/usr/bin/pyzor check' > /dev/null; then + if [ -x "/etc/init.d/amavisd-cn" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d amavisd-cn stop + else + /etc/init.d/amavisd-cn stop + fi + fi pkill -9 -u amavis -f '/usr/bin/pyzor check' > /dev/null || true - /etc/init.d/amavisd-cn start + if [ -x "/etc/init.d/amavisd-cn" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d amavisd-cn start + else + /etc/init.d/amavisd-cn start + fi + fi restart_daemon= restart_mta= fi +# register for automatic start +update-rc.d -f amavis remove >/dev/null || true +update-rc.d amavisd-cn defaults 19 21 >/dev/null + # START AMAVISD # about a half of amavisd-cn script is here if [ "$restart_daemon" -a -x /etc/init.d/amavis.amavisd-new ]; then - /etc/init.d/amavis.amavisd-new restart + if [ -x "/etc/init.d/amavis.amavisd-new" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d amavis.amavisd-new restart + else + /etc/init.d/amavis.amavisd-new restart + fi + fi fi # always check that the daemons are running if ! wait_for_fds amavis; then - /etc/init.d/amavis.amavisd-new start + if [ -x "/etc/init.d/amavis.amavisd-new" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d amavis.amavisd-new start + else + /etc/init.d/amavis.amavisd-new start + fi + fi wait_for_fds amavis fi if [ "$restart_mta" ]; then - /etc/init.d/$mta restart + if [ -x "/etc/init.d/$mta" ]; then + if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then + invoke-rc.d $mta restart + else + /etc/init.d/$mta restart + fi + fi fi # this needs to be updated when $CRONTAB file changes diff --git a/debian/postrm b/debian/postrm index e099a6a..593ba8a 100755 --- a/debian/postrm +++ b/debian/postrm @@ -6,6 +6,7 @@ if [ "$1" = remove ]; then rm -f /etc/init.d/amavis dpkg-divert --quiet --package amavisd-cn --remove --rename \ --divert /etc/init.d/amavis.amavisd-new /etc/init.d/amavis || true + update-rc.d amavis defaults 19 21 >/dev/null || true fi if [ "$1" = purge ]; then @@ -13,4 +14,5 @@ if [ "$1" = purge ]; then # /var/run/amavis now deleted in /etc/init.d/amavisd # keeping virusmails until --purge is used rm -fr /var/lib/amavis/amavis* + update-rc.d amavisd-cn remove >/dev/null || true fi diff --git a/debian/rules b/debian/rules index 93ad00b..1f1ea6c 100755 --- a/debian/rules +++ b/debian/rules @@ -72,14 +72,13 @@ binary-arch: build install # dh_installman # dh_link # dh_strip -# dh_compress + dh_compress dh_fixperms # dh_perl # dh_python # dh_makeshlibs dh_installdeb # dh_shlibdeps - sed -i '/init\.d/d' debian/amavisd-cn/DEBIAN/conffiles dh_gencontrol dh_md5sums dh_builddeb diff --git a/src/functions.sh b/src/functions.sh old mode 100755 new mode 100644 diff --git a/src/postfix.sh b/src/postfix.sh old mode 100755 new mode 100644 diff --git a/src/sendmail.sh b/src/sendmail.sh old mode 100755 new mode 100644 diff --git a/src/variables.sh b/src/variables.sh old mode 100755 new mode 100644