package/mender: create directory containing Mender state script
authorMirza Krak <mirza.krak@northern.tech>
Mon, 20 Aug 2018 13:09:04 +0000 (15:09 +0200)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 20 Aug 2018 14:51:08 +0000 (16:51 +0200)
Mender state-scripts are essentially "hooks" that can be provided to
influence the update flow.

They should be placed inside /etc/mender/scripts and the directory must
contain a file containing the current state-script format version. It is
currently "2".

Signed-off-by: Mirza Krak <mirza.krak@northern.tech>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
package/mender/mender.mk

index deab0cb03955552cd1d99633909d64d0e39b800b..a90ca3d2a882340b549c6f30370869c1f0ad1f25 100644 (file)
@@ -8,6 +8,9 @@ MENDER_VERSION = 1.4.0
 MENDER_SITE = $(call github,mendersoftware,mender,$(MENDER_VERSION))
 
 define MENDER_INSTALL_CONFIG_FILES
+       $(INSTALL) -d -m 755 $(TARGET_DIR)/etc/mender/scripts
+       echo -n "2" > $(TARGET_DIR)/etc/mender/scripts/version
+
        $(INSTALL) -D -m 0644 package/mender/mender.conf \
                $(TARGET_DIR)/etc/mender/mender.conf
        $(INSTALL) -D -m 0644 package/mender/tenant.conf \