All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] package/ifplugd: add option to override sysconfdir
@ 2024-01-15 14:27 Alisa Volk via buildroot
  2024-02-05 17:09 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Alisa Volk via buildroot @ 2024-01-15 14:27 UTC (permalink / raw)
  To: buildroot; +Cc: Alisa Volk, ovlevin

Add BR2_PACKAGE_IFPLUGD_SYSCONFDIR option to pass custom --sysconfdir argument.

Ifplugd init script is auto-generated with sysconfdir="etc/" by default.
As a result path to ifplugd configuration file is hardcoded
to /etc/ifplugd/ifplugd.conf.

This patch allows to override sysconfdir making it possible
to use custom path to configuration file.

Signed-off-by: Alisa Volk <aolvolk@salutedevices.com>
---
 package/ifplugd/Config.in  | 6 ++++++
 package/ifplugd/ifplugd.mk | 4 +++-
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/package/ifplugd/Config.in b/package/ifplugd/Config.in
index c4b5b5b9d1..772c084132 100644
--- a/package/ifplugd/Config.in
+++ b/package/ifplugd/Config.in
@@ -12,3 +12,9 @@ config BR2_PACKAGE_IFPLUGD
 	  configure the interface when a cable is really connected.
 
 	  http://0pointer.de/lennart/projects/ifplugd/
+
+config BR2_PACKAGE_IFPLUGD_SYSCONFDIR
+	string "sysconfdir"
+	default "/etc"
+	help
+	  Path to ifplugd.conf and ifplugd.action files.
diff --git a/package/ifplugd/ifplugd.mk b/package/ifplugd/ifplugd.mk
index 6de7f17641..5d7f1562d3 100644
--- a/package/ifplugd/ifplugd.mk
+++ b/package/ifplugd/ifplugd.mk
@@ -13,7 +13,9 @@ IFPLUGD_AUTORECONF = YES
 
 # install-strip unconditionally overwrites $(TARGET_DIR)/etc/ifplugd/ifplugd.*
 IFPLUGD_INSTALL_TARGET_OPTS = DESTDIR=$(TARGET_DIR) install-exec
-IFPLUGD_CONF_OPTS = --disable-lynx --with-initdir=/etc/init.d/
+IFPLUGD_CONF_OPTS = --disable-lynx \
+	--with-initdir=/etc/init.d/ \
+	--sysconfdir=$(BR2_PACKAGE_IFPLUGD_SYSCONFDIR)
 IFPLUGD_DEPENDENCIES = libdaemon
 
 define IFPLUGD_INSTALL_FIXUP
-- 
2.39.3 (Apple Git-145)

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-02-09 22:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-15 14:27 [Buildroot] [PATCH] package/ifplugd: add option to override sysconfdir Alisa Volk via buildroot
2024-02-05 17:09 ` Thomas Petazzoni via buildroot
     [not found]   ` <d63d6a13-770c-4a4c-bad3-c4d97a54d747@salutedevices.com>
2024-02-09 22:00     ` Thomas Petazzoni via buildroot

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.