mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Alexander Dahl <ada@thorsis.com>
To: ptxdist@pengutronix.de
Subject: [ptxdist] [PATCH v2 2/4] mosquitto: Install default config file
Date: Fri,  9 Aug 2019 14:25:56 +0200	[thread overview]
Message-ID: <20190809122558.19065-3-ada@thorsis.com> (raw)
In-Reply-To: <20190809122558.19065-1-ada@thorsis.com>

The broker service should run with a config file, but we can't use the
example installed with the default install stage with
'install_alternative' in targetinstall stage (wrong place), so we
install it a second time to a place better suitable.

Signed-off-by: Alexander Dahl <ada@thorsis.com>
---
 rules/mosquitto.make | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/rules/mosquitto.make b/rules/mosquitto.make
index 6d3002a82..63cd2dca5 100644
--- a/rules/mosquitto.make
+++ b/rules/mosquitto.make
@@ -54,6 +54,16 @@ MOSQUITTO_INSTALL_OPT	:= \
 	$(MOSQUITTO_MAKE_OPT) \
 	install
 
+# ----------------------------------------------------------------------------
+# Install
+# ----------------------------------------------------------------------------
+$(STATEDIR)/mosquitto.install:
+	@$(call targetinfo)
+	@$(call world/install, MOSQUITTO)
+	@install -v -D -m644 $(MOSQUITTO_DIR)/mosquitto.conf \
+		$(MOSQUITTO_PKGDIR)/etc/mosquitto/mosquitto.conf
+	@$(call touch)
+
 # ----------------------------------------------------------------------------
 # Target-Install
 # ----------------------------------------------------------------------------
@@ -77,6 +87,8 @@ endif
 
 ifdef PTXCONF_MOSQUITTO_BROKER
 	@$(call install_copy, mosquitto, 0, 0, 0755, -, /usr/sbin/mosquitto)
+	@$(call install_alternative, mosquitto, 0, 0, 0644, \
+		/etc/mosquitto/mosquitto.conf)
 endif
 
 	@$(call install_finish, mosquitto)
-- 
2.20.1


_______________________________________________
ptxdist mailing list
ptxdist@pengutronix.de

  parent reply	other threads:[~2019-08-09 12:26 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-09 12:25 [ptxdist] [PATCH v2 0/4] mosquitto: Version bump and systemd support Alexander Dahl
2019-08-09 12:25 ` [ptxdist] [PATCH v2 1/4] rootfs: Add 'mosquitto' user and group Alexander Dahl
2019-08-09 12:25 ` Alexander Dahl [this message]
2019-08-09 12:25 ` [ptxdist] [PATCH v2 3/4] mosquitto: version bump 1.4.14 -> 1.6.4 Alexander Dahl
2019-08-09 12:25 ` [ptxdist] [PATCH v2 4/4] mosquitto: Add systemd service unit Alexander Dahl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190809122558.19065-3-ada@thorsis.com \
    --to=ada@thorsis.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox