networks: Move initial connection setup to Plinth

- For a user who installed using FreedomBox disk image, when Plinth upgrades to
  a release containing this change, don't run network setup. This is ensured by
  not incrementing the version number of the networks module.

- For a user who installed using freedombox-setup Debian package, when Plinth
  upgrades to a release containing this change, don't run network setup. This is
  ensured by not incrementing the version number of the networks module.

- For a user who installed using freedombox-setup Debian package, when Plinth is
  run for the first time, don't run network setup. This is ensured by checking
  for the file /var/lib/freedombox/is-freedombox-disk-image which will not
  exist.

- For a user who installed using FreedomBox disk image, when Plinth runs for the
  first time, setup process executes and triggers the script due networks module
  being an essential module.

Signed-off-by: Sunil Mohan Adapa <sunil@medhas.org>
Signed-off-by: Joseph Nuthalapati <njoseph@thoughtworks.com>
This commit is contained in:
Sunil Mohan Adapa committed 2017-10-03 18:40:51 +05:30
1 parent f8009b6ce2
commit f1459c066f
2 files changed
+142

No files matched your search

+2
View File
@@ -23,6 +23,7 @@ from django.utils.translation import ugettext_lazy as _
from logging import Logger
import subprocess
from plinth import actions
from plinth import action_utils
from plinth import network
from plinth.menu import main_menu
@@ -48,6 +49,7 @@ def init():
def setup(helper, old_version=None):
"""Install and configure the module."""
helper.install(managed_packages)
actions.superuser_run('networks')
def diagnose():