~ubuntu-branches/ubuntu/trusty/sendmail/trusty-proposed

« back to all changes in this revision

Viewing changes to debian/examples/dhcp/dhclient-exit-hooks.d/sendmail

  • Committer: Package Import Robot
  • Author(s): Artur Rona
  • Date: 2014-02-05 23:11:58 UTC
  • mfrom: (9.1.10 sid)
  • Revision ID: package-import@ubuntu.com-20140205231158-gz0hae4ki4o6c6c8
Tags: 8.14.4-4.1ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/examples/checksendmail/checksendmail.8,
    debian/examples/checksendmail/harker/checksendmail.8:
    + Some man page corrections.
  - debian/patches/8.14/8.14.4/conf.c-ipv6.patch:
    + Fix A-only MX CNAME interface binding issues when using IPv6.
* Dropped following patches, already applied in Debian:
  - debian/patches/8.14/8.14.4/ld_as_needed -> fix_linkage
  - debian/patches/8.14/8.14.4/raise-max-daemons.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/sh
2
 
#
3
 
# This script is called when a dhcp event occurs.
4
 
#                
5
 
# Here is where we'll start/stop sendmail if needed.
6
 
#
7
 
# Written By Richard Nelson <cowboy@debian.org>
8
 
#
9
 
# NOTE: The following lines (without the #) must be in /etc/mail/sendmail.mc:
10
 
# include(`/etc/mail/dialup.m4')dnl
11
 
# include(`/etc/mail/provider.m4')dnl
12
 
#
13
 
# NOTE: The dhcp DNS name is used as the peer name in /etc/mail/peers.
14
 
#
15
 
 
16
 
# No need to continue if we're called with an unsupported option
17
 
case "$reason" in
18
 
        EXPIRE|FAIL|RELEASE|STOP)           #down... and TIMEOUT too ???
19
 
                ;;
20
 
        BOUND|RENEW|REBIND|REBOOT|TIMEOUT)  #up...  why TIMEOUT here ???
21
 
                ;;
22
 
        *)
23
 
                return;
24
 
                ;;
25
 
        esac;
26
 
 
27
 
# Bring in some script functions to handle dynamic configuration
28
 
. /usr/share/sendmail/dynamic;
29
 
 
30
 
# Note the interface that just changed
31
 
update_interface "$interface" "$reason";
32
 
 
33
 
# If the domain name has changed, update the provider information
34
 
if [ "$new_domain_name" != "$old_domain_name" ]; then
35
 
        update_provider "$new_domain_name";
36
 
        fi;
37
 
 
38
 
# If the ip address has changed, update the host information
39
 
if [ "$new_ip_address" != "$oldnew_ip_address" ]; then
40
 
        update_host "$new_ip_address";
41
 
        fi;
42
 
 
43
 
# If anything has been changed, update sendmail.cf and reload
44
 
# Actually, we'll delay the reload because we'll be hit in a moment
45
 
# to handle the change by /etc/network/if-up.d/sendmail
46
 
update_sendmail "dhcp" Delayed;
47
 
 
48
 
return;
49