diff --git a/actions/upgrades b/actions/upgrades index 2d130660e..561edcc8c 100755 --- a/actions/upgrades +++ b/actions/upgrades @@ -61,7 +61,11 @@ def subcommand_run(_): sys.exit(1) try: - subprocess.check_call(['unattended-upgrades', '-v']) + subprocess.Popen( + ['unattended-upgrades', '-v'], + stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL, + stderr=subprocess.DEVNULL, close_fds=True, + start_new_session=True) except FileNotFoundError: print('Error: unattended-upgrades is not available.', file=sys.stderr) sys.exit(2) diff --git a/plinth/modules/upgrades/templates/upgrades.html b/plinth/modules/upgrades/templates/upgrades.html index 6bc6f0391..15b0167b2 100644 --- a/plinth/modules/upgrades/templates/upgrades.html +++ b/plinth/modules/upgrades/templates/upgrades.html @@ -22,7 +22,7 @@ {% block page_head %} - {% if running %} + {% if is_busy %} {% endif %} @@ -33,47 +33,25 @@
+ {% blocktrans trimmed %} + Upgrades install the latest software and security updates. When automatic + upgrades are enabled, upgrades are automatically run every night. You + don't normally need to start the upgrade process. + {% endblocktrans %} +
- {% if result.return_code %} -- {% trans "There was an error while upgrading." %} -
++ {% blocktrans trimmed %} + Depending on the number of packages to install, this may take a long time + to complete. While upgrades are in progress, you will not be able to + install other packages. During the upgrade, this web interface may be + temporarily unavailable and show an error. Refresh the page to continue. + {% endblocktrans %} +
-{{ result.error }}
- {% if result.output %}
- {{ result.output }}
- {% endif %}
- {% else %}
- - {% trans "The operating system is up to date now. " %} - -
- -{{ result.output }}
- - {% blocktrans trimmed %} - This will run unattended-upgrades, which will attempt to upgrade - your system with the latest Debian packages. It may take a few - minutes to complete. - {% endblocktrans %} -
- -