package/dhcp/S80dhcp-server: support extra options
authorBenoît Thébaudeau <benoit@wsystem.com>
Sun, 25 Oct 2015 00:59:29 +0000 (02:59 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 24 Dec 2015 14:00:38 +0000 (15:00 +0100)
Add an OPTIONS configuration variable in order to make it possible to
pass custom extra options to dhcpd.

Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/dhcp/S80dhcp-server

index f52ca98dc0601304f3dec55c6de44eec65c33c51..2538d42a2ab59c8f0143aa11f6661843f88d376a 100755 (executable)
@@ -7,6 +7,9 @@
 #       Separate multiple interfaces with spaces, e.g. "eth0 eth1".
 INTERFACES=""
 
+# Additional options that are passed to the DHCP server daemon?
+OPTIONS=""
+
 NAME="dhcpd"
 DAEMON="/usr/sbin/${NAME}"
 CFG_FILE="/etc/default/${NAME}"
@@ -24,7 +27,7 @@ case "$1" in
                printf "Starting DHCP server: "
                test -d /var/lib/dhcp/ || mkdir -p /var/lib/dhcp/
                test -f /var/lib/dhcp/dhcpd.leases || touch /var/lib/dhcp/dhcpd.leases
-               start-stop-daemon -S -x ${DAEMON} -- -q $INTERFACES
+               start-stop-daemon -S -x ${DAEMON} -- -q $OPTIONS $INTERFACES
                [ $? = 0 ] && echo "OK" || echo "FAIL"
                ;;
        stop)