Standalone State Scripts not executed

jabas
Wed, 04 Aug 2021 09:11:59 +0000
General Discussions

Hi, I’m running Mender standalone client 1.6.0. I have built an artifact with state scripts using Yocto (Sumo). Both 1.4.0 and 1.6.0 produce the same result. If I look inside the artifact, they are indeed included. For me, things happen differently to other posters. My scripts get extracted to whatever folder I run “mender” (not /var/lib/mender/scripts or /etc/mender/scripts).

When mender runs, the scripts are “processed” but never executed:

DEBU[0000] installer: processing script: ArtifactInstall_Enter_00 module=installer
DEBU[0000] installer: processing script: ArtifactInstall_Leave_50_x module=installer
DEBU[0000] installer: processing script: ArtifactInstall_Leave_99 module=installer
DEBU[0000] installer: processing script: ArtifactReboot_Leave_50 module=installer
DEBU[0000] installer: processing script: ArtifactCommit_Enter_50 module=installer

Basically copied from : https://github.com/mendersoftware/meta-mender/blob/dunfell/meta-mender-demo/recipes-mender/example-state-scripts/example-state-scripts_1.0.bb:

#!/bin/sh

echo "$(mender show-artifact): $(basename "$0") was called!" >&2
exit 0

Manually running each script executes fine but I never see this in the debug.

I tried adding:

touch /boot/test.txt to the script and the file is never created. I’ve also tried manually copying the scripts to both /var/lib/mender/scripts and /etc/mender/scripts on the calling partition (in case the mender client looks for the script in these locations - not where it extracted them) but still nothing gets called.

Help please

4 posts - 2 participants