mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
upgrades: Don't allow needrestart to restart freedombox-dist-upgrade
Signed-off-by: James Valleroy <jvalleroy@mailbox.org> Reviewed-by: Sunil Mohan Adapa <sunil@medhas.org>
This commit is contained in:
1 parent
0241b82479
commit
a66520f3ff
3 files changed
+10
-12
No files matched your search
+5
-7
@@ -12,8 +12,7 @@ import subprocess
|
||||
import sys
|
||||
|
||||
from plinth.action_utils import (apt_hold, debconf_set_selections,
|
||||
run_apt_command, service_is_running,
|
||||
service_restart)
|
||||
run_apt_command)
|
||||
from plinth.modules.apache.components import check_url
|
||||
from plinth.modules.upgrades import (BACKPORTS_SOURCES_LIST, SOURCES_LIST,
|
||||
get_current_release, is_backports_current)
|
||||
@@ -455,11 +454,10 @@ def subcommand_activate_backports(arguments):
|
||||
|
||||
def subcommand_start_dist_upgrade(_):
|
||||
"""Start dist upgrade process."""
|
||||
if not service_is_running('freedombox-dist-upgrade'):
|
||||
subprocess.Popen(['systemctl', 'start', 'freedombox-dist-upgrade'],
|
||||
stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, close_fds=True,
|
||||
start_new_session=True)
|
||||
subprocess.Popen(['systemctl', 'start', 'freedombox-dist-upgrade'],
|
||||
stdin=subprocess.DEVNULL, stdout=subprocess.DEVNULL,
|
||||
stderr=subprocess.DEVNULL, close_fds=True,
|
||||
start_new_session=True)
|
||||
|
||||
|
||||
def subcommand_dist_upgrade(arguments):
|
||||
|
||||
Reference in new issue
Block a user