
All the Artifact scripts are prefixed with Artifact. The Artifact scripts are part of the Artifact and are delivered to the Client inside the Artifact. The default locationįor those scripts is /etc/mender/scripts. The root filesystems scripts are stored as a part of the current root filesystem. There are two types of the state scripts: root filesystem and Artifact. These are the states that are executed in standalone mode: If Mender is used in standalone mode (installing via command line), some states are omitted from execution because Mender is not running as a daemon. Most of the states also have an "Error" transition which is run when some error occurs while executing any action inside the given state (including execution of Enter and Leave scripts). State scripts can either be run as we transition into a state "Enter", or out from a state, "Leave". This state always runs after the ArtifactRollback and ArtifactRollbackReboot states.


For some examples of usage, see example use cases. However, Mender state scripts are more general and useful than pre/postinstall scripts because they can be run between any state transition, not just (before/after) the install state. The Mender Client has the ability to run pre- and postinstall scripts, before and after it writes the root filesystem. How to make an apply-device-config script.

Production installation with Kubernetes.

