package/dhcp/S80dhcp-server: support extra options

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>
This commit is contained in:
Benoît Thébaudeau 2015-10-25 02:59:29 +02:00 committed by Thomas Petazzoni
parent 0bc15867da
commit 80965e30eb

View File

@ -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)