Project

General

Profile

isc-dhcp-relay.conf

équipe eole Academie d'Orléans-Tours, 02/09/2018 11:34 AM

Download (804 Bytes)

 
1
description "ISC DHCP IPv4 relay"
2
author "Stéphane Graber <stgraber@ubuntu.com>"
3

    
4
#Mod ORL cf #17296#start on runlevel [2345]
5
start on (runlevel [2345] and static-network-up)
6
stop on runlevel [!2345]
7

    
8
pre-start script
9
    if [ ! -f /etc/default/isc-dhcp-relay ]; then
10
        echo "/etc/default/isc-dhcp-relay does not exist! - Aborting..."
11
        echo "Run 'dpkg-reconfigure isc-dhcp-relay' to fix the problem."
12
        stop
13
        exit 0
14
    fi
15
end script
16

    
17
respawn
18
script
19
    . /etc/default/isc-dhcp-relay
20

    
21
    # Build command line for interfaces (will be passed to dhrelay below.)
22
    IFCMD=""
23
    if test "$INTERFACES" != ""; then
24
        for I in $INTERFACES; do
25
            IFCMD=${IFCMD}"-i "${I}" "
26
        done
27
    fi
28

    
29
    exec /usr/sbin/dhcrelay -d -q -4 $OPTIONS $IFCMD $SERVERS
30
end script