package/mender: adding device_type file
authorAngelo Compagnucci <angelo@amarulasolutions.com>
Tue, 5 Feb 2019 10:49:58 +0000 (11:49 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Tue, 5 Feb 2019 13:09:17 +0000 (14:09 +0100)
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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/mender/device_type [new file with mode: 0644]
package/mender/mender.mk

diff --git a/package/mender/device_type b/package/mender/device_type
new file mode 100644 (file)
index 0000000..a097ef2
--- /dev/null
@@ -0,0 +1 @@
+device_type=BUILDROOT_DEVICE
index 0377270a43b4591c891283dd14b653c675547b7b..0d719382f80911b57cc81f756803069f37056fcf 100644 (file)
@@ -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