diff options
Diffstat (limited to 'debian/local')
-rw-r--r-- | debian/local/Parse_conf.pm.in | 1 | ||||
-rw-r--r-- | debian/local/dynamic.in | 35 | ||||
-rw-r--r-- | debian/local/update_sys.in | 2 |
3 files changed, 24 insertions, 14 deletions
diff --git a/debian/local/Parse_conf.pm.in b/debian/local/Parse_conf.pm.in index 917eae2..8b8bc3e 100644 --- a/debian/local/Parse_conf.pm.in +++ b/debian/local/Parse_conf.pm.in @@ -803,6 +803,7 @@ LOG_CMDS="$parameter{'LOG_CMDS'}"; # Don't do it! [laughs] I treat the .cf file as a binary # file - you should too." # -- Eric Allman 1999/10/18 +# http://www.dotcomeon.com/allman_sendmail_qa.html # HANDS_OFF="$parameter{'HANDS_OFF'}"; # diff --git a/debian/local/dynamic.in b/debian/local/dynamic.in index 82b6d7c..ccc7ba5 100644 --- a/debian/local/dynamic.in +++ b/debian/local/dynamic.in @@ -114,13 +114,14 @@ update_interface() { esac; # Mark what we're doing... - local msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; + local msg; + msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; if [ "$LOG_CMDS" != 'No' ]; then /usr/bin/logger -i -p mail.debug -- "$0 (dynamic) update_interface: $msg"; fi; # Do absolutely nothing if they say so... - if [ "$HANDS_OFF" != 'No' ]; then + if [ "$HANDS_OFF" != 'No' -o "$DAEMON_NETMODE" = 'Static' ]; then SM_ignore=1; fi; if [ -z "$SM_interface" ]; then @@ -148,13 +149,14 @@ update_provider() { SM_provider="$1"; # Mark what we're doing... - local msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; + local msg; + msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; if [ "$LOG_CMDS" != 'No' ]; then /usr/bin/logger -i -p mail.debug -- "$0 (dynamic) update_provider: $msg"; fi; # Do absolutely nothing if they say so... - if [ "$HANDS_OFF" != 'No' ]; then + if [ "$HANDS_OFF" != 'No' -o "$DAEMON_NETMODE" = 'Static' ]; then SM_ignore=1; fi; if [ $SM_ignore -ne 0 ]; then @@ -199,13 +201,14 @@ update_host() { SM_ip="$1"; # Mark what we're doing... - local msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; + local msg; + msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; if [ "$LOG_CMDS" != 'No' ]; then /usr/bin/logger -i -p mail.debug -- "$0 (dynamic) update_host: $msg"; fi; # Do absolutely nothing if they say so... - if [ "$HANDS_OFF" != 'No' ]; then + if [ "$HANDS_OFF" != 'No' -o "$DAEMON_NETMODE" = 'Static' ]; then SM_ignore=1; fi; if [ $SM_ignore -ne 0 ]; then @@ -268,13 +271,14 @@ update_host() { update_resolv() { # Mark what we're doing... - local msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; + local msg; + msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; if [ "$LOG_CMDS" != 'No' ]; then /usr/bin/logger -i -p mail.debug -- "$0 (dynamic) update_resolv: $msg"; fi; # Do absolutely nothing if they say so... - if [ "$HANDS_OFF" != 'No' ]; then + if [ "$HANDS_OFF" != 'No' -o "$DAEMON_NETMODE" = 'Static' ]; then SM_ignore=1; fi; if [ $SM_ignore -ne 0 ]; then @@ -295,7 +299,9 @@ update_resolv() { # Purge any latent host status that might cause us to *NOT* send mail if [ -x @sysconfdir@/init.d/sendmail ]; then - @sysconfdir@/init.d/sendmail purgestat now + if [ "$SM_state" = 'up' ]; then + @sysconfdir@/init.d/sendmail purgestat now; + fi; fi; # resolvconf is called as a DHCP pre-exit, so we'll defer any changes @@ -364,13 +370,14 @@ update_sendmail() { SM_opts="$2"; # Mark what we're doing... - local msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; + local msg; + msg="$SM_interface $SM_state $SM_provider $SM_ip $SM_host"; if [ "$LOG_CMDS" != 'No' ]; then /usr/bin/logger -i -p mail.debug -- "$0 (dynamic) update_sendmail: $msg"; fi; # Do absolutely nothing if they say so... - if [ "$HANDS_OFF" != 'No' ]; then + if [ "$HANDS_OFF" != 'No' -o "$DAEMON_NETMODE" = 'Static' ]; then SM_ignore=1; fi; if [ $SM_ignore -ne 0 ]; then @@ -422,8 +429,10 @@ update_sendmail() { # Purge any latent host status that might cause us to *NOT* send mail # Reload sendmail, IFF already running if [ -x @sysconfdir@/init.d/sendmail ]; then - @sysconfdir@/init.d/sendmail purgestat now - @sysconfdir@/init.d/sendmail reload-if-running; # up, or down + if [ "$SM_state" = 'up' ]; then + @sysconfdir@/init.d/sendmail purgestat now; + fi; + @sysconfdir@/init.d/sendmail reload-if-running & # up, or down fi; fi; diff --git a/debian/local/update_sys.in b/debian/local/update_sys.in index fac690b..e086a6c 100644 --- a/debian/local/update_sys.in +++ b/debian/local/update_sys.in @@ -227,7 +227,7 @@ chown smmta:smmsp @localstatedir@/spool/mqueue; chmod 02750 @localstatedir@/spool/mqueue; # # With the MSP/MTA split, we *DO* need g=r, gid=smmsp queue directories and -# files mailq to work... +# files for mailq to work... find @localstatedir@/spool/mqueue -print \ | xargs -r chown smmta:smmsp; find @localstatedir@/spool/mqueue -type d -print \ |