package/dhcp: make S80dhcp-relay read a file from /etc/default/
The S80dhcp-relay init script has configuration variables like INTERFACES whose contents have to be passed to the daemon. These variables are initialized as empty strings, but some of them are not allowed to be empty and there was no means of filling them apart from creating a root FS overlay to overwrite these scripts. This commit adds support for reading dhcrelay under /etc/default/ to set these configuration variables. [Thomas: adapt to patch only S80dhcp-relay, since S80dhcp-server has already been changed by previous commits.] 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:
parent
a118f32e9a
commit
0bc15867da
@ -13,6 +13,10 @@ INTERFACES=""
|
||||
# Additional options that are passed to the DHCP relay daemon?
|
||||
OPTIONS=""
|
||||
|
||||
# Read configuration variable file if it is present
|
||||
CFG_FILE="/etc/default/dhcrelay"
|
||||
[ -r "${CFG_FILE}" ] && . "${CFG_FILE}"
|
||||
|
||||
# Sanity checks
|
||||
test -f /usr/sbin/dhcrelay || exit 0
|
||||
test -n "$INTERFACES" || exit 0
|
||||
|
Loading…
Reference in New Issue
Block a user