# Update Installation after Cancellation

**URL:** <https://hub.mender.io/t/update-installation-after-cancellation/2485>\
**Category:** General Discussions\
**Created:** [September 24, 2020, 11:45am UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485 "2020-09-24T11:45:51Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![SamanRatna](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@SamanRatna](https://hub.mender.io/u/SamanRatna)\
**Post date:** [September 24, 2020, 11:45am UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485/1 "2020-09-24T11:45:52Z")

</div>

If the mender client happens to cancel an update and choose to install it whenever he would want, how can we make that happen?

(On a side note, time gap between cancellation and then installation could be too long and in this gap, there could be lack of internet connection on Mender client)

Are there features available in Professsional and Enterprise packages only ?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 24, 2020, 12:42pm UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485/2 "2020-09-24T12:42:12Z")

</div>

I’m not quite sure I understand the question, but if you are thinking about downloading an update, and waiting for user confirmation, could this be something:

> **[State scripts | Mender documentation](https://docs.mender.io/2.3/artifacts/state-scripts#update-confirmation-by-end-user)**

---

<div class="post-metadata">

**Author:** ![SamanRatna](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@SamanRatna](https://hub.mender.io/u/SamanRatna)\
**Post date:** [September 24, 2020, 1:08pm UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485/3 "2020-09-24T13:08:59Z")

</div>

What I am trying to say is, for example,

when an update is deployed, the user gets the popup message if he would want to install. But the user wishes to install the update whenever he wishes to, (the user is uncertain himself). The device by default has a button to check for update. When he feels like he wants the new update to be installed, he clicks it himself.

How can I accomplish that ?

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [September 24, 2020, 1:19pm UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485/4 "2020-09-24T13:19:57Z")

</div>

Isn’t this exactly what the documentation example states?

---

<div class="post-metadata">

**Author:** ![SamanRatna](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@SamanRatna](https://hub.mender.io/u/SamanRatna)\
**Post date:** [September 24, 2020, 2:43pm UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485/5 "2020-09-24T14:43:50Z")

</div>

The Download\_Enter\_01\_User\_confirmation.py script wouldn’t run. it is located in etc/mender/scripts directory and I followed this code for it. The mender server shows “queued to start” and wouldn’t continue. Is there anything I need to configure to run the script?

#!/usr/bin/env python3

import os, pwd  
import tkinter, tkinter.messagebox  
indent preformatted text by 4 spaces  
os.environ[“DISPLAY”] = “:0”

pwstruct = pwd.getpwnam(“pi”)  
os.setgid(pwstruct.pw\_uid)  
os.setuid(pwstruct.pw\_gid)

window = tkinter.Tk()  
window.eval(‘tk::PlaceWindow %s center’ % window.winfo\_toplevel())  
window.withdraw()

if tkinter.messagebox.askyesno(‘User Confirmation’, ‘Do you want to update to the latest release  
version?’, icon=‘warning’) == True:

```
tkinter.sys.exit(0)

```

else:  
tkinter.sys.exit(21)

window.deiconify()  
window.destroy()  
window.quit()

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [September 24, 2020, 5:06pm UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485/6 "2020-09-24T17:06:41Z")

</div>

[This tutorial](https://hub.mender.io/t/how-to-create-state-scripts-with-mender-using-raspberry-pi/1518) may help.

---

<div class="post-metadata">

**Author:** ![SamanRatna](https://avatars.discourse-cdn.com/v4/letter/s/6a8cbe/32.png) [@SamanRatna](https://hub.mender.io/u/SamanRatna)\
**Post date:** [September 24, 2020, 5:37pm UTC](https://hub.mender.io/t/update-installation-after-cancellation/2485/7 "2020-09-24T17:37:03Z")

</div>

Yes I followed that same tutorial. Only difference I want to make at this time is that, I would like to execute that very script content from Download\_Enter\_01\_User.py file located on etc/mender/scripts directory.

It wouldn’t execute. Mender server only shows “pending”. What can be the problem here ?
