Commit 80965e30 authored by Benoît Thébaudeau's avatar Benoît Thébaudeau Committed by Thomas Petazzoni
Browse files

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: default avatarBenoît Thébaudeau <benoit@wsystem.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent 0bc15867
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -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)