All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/dhcp: make S80dhcp-relay read a file from /etc/default/
@ 2015-12-24 13:57 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2015-12-24 13:57 UTC (permalink / raw)
  To: buildroot

commit: http://git.buildroot.net/buildroot/commit/?id=0bc15867dad61c24769d635c31c8263695ed92c0
branch: http://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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>
---
 package/dhcp/S80dhcp-relay | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/dhcp/S80dhcp-relay b/package/dhcp/S80dhcp-relay
index 5ee06c7..0f383e6 100755
--- a/package/dhcp/S80dhcp-relay
+++ b/package/dhcp/S80dhcp-relay
@@ -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

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-12-24 13:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-12-24 13:57 [Buildroot] [git commit] package/dhcp: make S80dhcp-relay read a file from /etc/default/ Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.