Import Debian changes 4.89-2+deb9u3~bpo8+1
[hcoop/debian/exim4.git] / debian / exim4-config.postinst
index beaabf5..42d7b53 100644 (file)
@@ -183,7 +183,8 @@ fi
 #  Disable orphaned inetd-entries from exim (v3) caused by bugs #202670
 #  and #182206.
 if [ "$1" = "configure" ] &&\
-       [ -x /usr/sbin/update-inetd ] && [ ! -x /usr/sbin/exim ] && \
+       which update-inetd > /dev/null && which exim > /dev/null && \
+       [ -f /etc/inetd.conf ] && \
        grep -E -q '^smtp[[:space:]]*stream[[:space:]]*tcp[[:space:]]*nowait[[:space:]]*mail[[:space:]]*/usr/sbin/+exim exim -bs' /etc/inetd.conf
 then
    update-inetd --comment-chars \#disabled\# \
@@ -367,8 +368,8 @@ case "$1" in
                        db_stop
                        if [ -n "$EX4DEBUG" ]; then
                          netstat -tulpen
-                         ls -al /var/run/exim4/
-                         cat /var/run/exim4/exim.pid
+                         ls -al /run/exim4/
+                         cat /run/exim4/exim.pid
                          pidof exim4
                        fi
                        if [ "$dc_eximconfig_configtype" = "none" ]; then
@@ -380,8 +381,8 @@ case "$1" in
                        fi
                        if [ -n "$EX4DEBUG" ]; then
                          netstat -tulpen
-                         ls -al /var/run/exim4/
-                         cat /var/run/exim4/exim.pid
+                         ls -al /run/exim4/
+                         cat /run/exim4/exim.pid
                          pidof exim4
                          if pidof exim4; then
                            echo >&2 "WARN: There are some exim4 processes still running after stopping exim"