# State script version

**URL:** <https://hub.mender.io/t/state-script-version/882>\
**Category:** General Discussions\
**Tags:** yocto\
**Created:** [August 4, 2019, 12:16pm UTC](https://hub.mender.io/t/state-script-version/882 "2019-08-04T12:16:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [August 4, 2019, 12:16pm UTC](https://hub.mender.io/t/state-script-version/882/1 "2019-08-04T12:16:55Z")

</div>

I’m building images using yocto. The mender artifact includes a state script named ArtifactReboot\_Enter\_50.  
When updating, it seems the old version is used. ie the one already on the device.

How can I make sure only the new script is being executed?

---

<div class="post-metadata">

**Author:** ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)\
**Post date:** [August 5, 2019, 7:38am UTC](https://hub.mender.io/t/state-script-version/882/2 "2019-08-05T07:38:07Z")

</div>

It is supposed to do that already. Does it execute if you don’t include a new script at all?

---

<div class="post-metadata">

**Author:** ![mterwoord](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/mterwoord/32/100_2.png) [@mterwoord](https://hub.mender.io/u/mterwoord)\
**Post date:** [August 5, 2019, 9:37am UTC](https://hub.mender.io/t/state-script-version/882/3 "2019-08-05T09:37:20Z")

</div>

It seems I have difficulties updating the script in this image. Sorry for the fuss…

ANd now discovered a (stupid) bug in the script…
