Add a new config option to install mosquitto_passwd if needed onto the
target.

Signed-off-by: Fabian Pflug <[email protected]>
---
 rules/mosquitto.in   | 6 ++++++
 rules/mosquitto.make | 5 +++++
 2 files changed, 11 insertions(+)

diff --git a/rules/mosquitto.in b/rules/mosquitto.in
index 3c751ede7..e38b1e8c8 100644
--- a/rules/mosquitto.in
+++ b/rules/mosquitto.in
@@ -37,6 +37,12 @@ config MOSQUITTO_SRV
        bool
        prompt "SRV lookup support"
 
+config MOSQUITTO_PASSWD
+       bool
+       prompt "install mosquitto passwd"
+       help
+               Installs the file /usr/bin/mosquitto_passwd
+
 config MOSQUITTO_WEBSOCKETS
        bool
        depends on MOSQUITTO_BROKER
diff --git a/rules/mosquitto.make b/rules/mosquitto.make
index 239f1fe3c..d337ae630 100644
--- a/rules/mosquitto.make
+++ b/rules/mosquitto.make
@@ -106,6 +106,11 @@ ifdef PTXCONF_MOSQUITTO_SYSTEMD_UNIT
 endif
 endif
 
+ifdef PTXCONF_MOSQUITTO_PASSWD
+       # password file management
+       @$(call install_copy, mosquitto, 0, 0, 0755, -, 
/usr/bin/mosquitto_passwd)
+endif
+
        @$(call install_finish, mosquitto)
 
        @$(call touch)
-- 
2.47.2


Reply via email to