diff --git a/data/etc/plinth/plinth.config b/data/etc/plinth/plinth.config index 824b7969a..e59e65efc 100644 --- a/data/etc/plinth/plinth.config +++ b/data/etc/plinth/plinth.config @@ -1,7 +1,3 @@ -[Name] -product_name = Plinth -box_name = FreedomBox - [Path] # directory locations file_root = /usr/share/plinth @@ -39,6 +35,7 @@ use_x_forwarded_host = True secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO [Misc] +box_name = FreedomBox # The danube_edition changes the firstboot process and offers entering a # voucher for a freedombox.me sub-domain. This functionality requires # additional debian packages to be installed: diff --git a/plinth.config b/plinth.config index 0575578bd..d3a0cb62b 100644 --- a/plinth.config +++ b/plinth.config @@ -1,7 +1,3 @@ -[Name] -product_name = Plinth -box_name = FreedomBox - [Path] # directory locations file_root = %(root)s @@ -39,6 +35,7 @@ use_x_forwarded_host = True secure_proxy_ssl_header = HTTP_X_FORWARDED_PROTO [Misc] +box_name = FreedomBox # The danube_edition changes the firstboot process and offers entering a # voucher for a freedombox.me sub-domain. This functionality requires # additional debian packages to be installed: diff --git a/plinth/cfg.py b/plinth/cfg.py index 6f0b9fd42..f8fbad7da 100644 --- a/plinth/cfg.py +++ b/plinth/cfg.py @@ -20,7 +20,6 @@ import os from plinth.menu import Menu -product_name = None box_name = None root = None file_root = None @@ -67,9 +66,7 @@ def read(): }) parser.read(CONFIG_FILE) - config_items = {('Name', 'product_name', 'string'), - ('Name', 'box_name', 'string'), - ('Path', 'root', 'string'), + config_items = {('Path', 'root', 'string'), ('Path', 'file_root', 'string'), ('Path', 'config_dir', 'string'), ('Path', 'data_dir', 'string'), @@ -84,6 +81,7 @@ def read(): ('Network', 'port', 'int'), ('Network', 'secure_proxy_ssl_header', 'string'), ('Network', 'use_x_forwarded_host', 'bool'), + ('Misc', 'box_name', 'string'), ('Misc', 'danube_edition', 'bool')} for section, name, datatype in config_items: diff --git a/plinth/tests/data/plinth.config.with_missing_options b/plinth/tests/data/plinth.config.with_missing_options index 2ad26600a..684b415d1 100644 --- a/plinth/tests/data/plinth.config.with_missing_options +++ b/plinth/tests/data/plinth.config.with_missing_options @@ -1,5 +1,4 @@ -[Name] -product_name = Plinth +[Misc] box_name = FreedomBox [Path] diff --git a/plinth/tests/data/plinth.config.with_missing_sections b/plinth/tests/data/plinth.config.with_missing_sections index 5870c0b81..8e45697c1 100644 --- a/plinth/tests/data/plinth.config.with_missing_sections +++ b/plinth/tests/data/plinth.config.with_missing_sections @@ -1,4 +1,3 @@ -[Name] -product_name = Plinth +[Misc] box_name = FreedomBox diff --git a/plinth/tests/test_cfg.py b/plinth/tests/test_cfg.py index 1b5557066..7a8236790 100644 --- a/plinth/tests/test_cfg.py +++ b/plinth/tests/test_cfg.py @@ -198,10 +198,6 @@ class CfgTestCase(unittest.TestCase): """Compare two sets of configuration values.""" # Note that the count of items within each section includes the number # of default items (1, for 'root'). - self.assertEqual(3, len(parser.items('Name'))) - self.assertEqual(parser.get('Name', 'product_name'), cfg.product_name) - self.assertEqual(parser.get('Name', 'box_name'), cfg.box_name) - self.assertEqual(13, len(parser.items('Path'))) self.assertEqual(parser.get('Path', 'root'), cfg.root) self.assertEqual(parser.get('Path', 'file_root'), cfg.file_root) @@ -225,8 +221,10 @@ class CfgTestCase(unittest.TestCase): self.assertIsInstance(cfg.use_x_forwarded_host, bool) self.assertEqual(parser.get('Network', 'use_x_forwarded_host'), str(cfg.use_x_forwarded_host)) + self.assertEqual(3, len(parser.items('Misc'))) self.assertEqual(parser.get('Misc', 'danube_edition'), str(cfg.danube_edition)) + self.assertEqual(parser.get('Misc', 'box_name'), cfg.box_name) def read_temp_config_file(self, test_file): """Read the specified test configuration file.""" diff --git a/plinth/tests/test_context_processors.py b/plinth/tests/test_context_processors.py index b48a4f040..bf627ff54 100644 --- a/plinth/tests/test_context_processors.py +++ b/plinth/tests/test_context_processors.py @@ -40,7 +40,6 @@ class ContextProcessorsTestCase(TestCase): config = response['cfg'] self.assertIsNotNone(config) - self.assertEqual('Plinth', config.product_name) self.assertEqual('FreedomBox', config.box_name) submenu = response['submenu']