diff mbox series

[v3,4/5] package/mender: adding device_type file

Message ID 1549363799-30840-5-git-send-email-angelo@amarulasolutions.com
State Accepted
Commit 387fadbf8ddebbdbb1b1f0a27ab22c5f94d623cc
Headers show
Series [v3,1/5] package/mender: adding a writable location | expand

Commit Message

Angelo Compagnucci Feb. 5, 2019, 10:49 a.m. UTC
In order to have the mender package working out of the box, the
/etc/mender/device_type should be present and should contain a
valid device_type value.
This patch provides a default file that can be overridden easily
from an overlay.

Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
Acked-by: <aduskett@gmail.com>
---
 package/mender/device_type | 1 +
 package/mender/mender.mk   | 3 +++
 2 files changed, 4 insertions(+)
 create mode 100644 package/mender/device_type

Comments

Peter Korsgaard Feb. 5, 2019, 1:09 p.m. UTC | #1
>>>>> "Angelo" == Angelo Compagnucci <angelo@amarulasolutions.com> writes:

 > In order to have the mender package working out of the box, the
 > /etc/mender/device_type should be present and should contain a
 > valid device_type value.
 > This patch provides a default file that can be overridden easily
 > from an overlay.

 > Signed-off-by: Angelo Compagnucci <angelo@amarulasolutions.com>
 > Acked-by: <aduskett@gmail.com>

Committed, thanks.
diff mbox series

Patch

diff --git a/package/mender/device_type b/package/mender/device_type
new file mode 100644
index 0000000..a097ef2
--- /dev/null
+++ b/package/mender/device_type
@@ -0,0 +1 @@ 
+device_type=BUILDROOT_DEVICE
diff --git a/package/mender/mender.mk b/package/mender/mender.mk
index 0377270..0d71938 100644
--- a/package/mender/mender.mk
+++ b/package/mender/mender.mk
@@ -53,6 +53,9 @@  define MENDER_INSTALL_CONFIG_FILES
 	$(INSTALL) -D -m 0755 package/mender/artifact_info \
 			$(TARGET_DIR)/etc/mender/artifact_info
 
+	$(INSTALL) -D -m 0755 package/mender/device_type \
+			$(TARGET_DIR)/etc/mender/device_type
+
 	ln -snf /var/run/mender $(TARGET_DIR)/var/lib/mender
 endef