ArtifactReboot_Enter not executing


Does ArtifactReboot state happen by default ? It didn’t happen by default in my system then I tried to run:

os.system(‘sudo shutdown -r now’)

from inside ArtifactReboot_Enter script. It didn’t work.

To check properly, I made scripts for ArtifactInstall_Enter, ArtifactInstall_Leave, ArtifactReboot_Enter and ArtifactCommit_Leave.

All the scripts run except for the ArtifactReboot_Enter. I am doing this project for application update only for directory update.

Thanks in advance.

I’m not sure you want to do a shutdown in the state scripts as it can interfere with Mender’s understanding of the state. Probably you want to implement a custom update module that supports rebooting. See this link and specifically the “NeedsArtifactReboot” details.