@@ -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
@@ -7,6 +7,10 @@
# Separate multiple interfaces with spaces, e.g. "eth0 eth1".
INTERFACES=""
+# Read configuration variable file if it is present
+CFG_FILE="/etc/default/dhcpd"
+[ -r "${CFG_FILE}" ] && . "${CFG_FILE}"
+
# Sanity checks
test -f /usr/sbin/dhcpd || exit 0
test -f /etc/dhcp/dhcpd.conf || exit 0
The SysV init scripts have 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 files under /etc/default/ to set these configuration variables. Such light files can now be added to the root FS skeleton or overlays without having to duplicate most of the SysV init scripts. Signed-off-by: Benoît Thébaudeau <benoit@wsystem.com> --- package/dhcp/S80dhcp-relay | 4 ++++ package/dhcp/S80dhcp-server | 4 ++++ 2 files changed, 8 insertions(+)