diff --git a/modules/installed/first_boot.py b/modules/installed/first_boot.py index d02dff553..b8b58e935 100644 --- a/modules/installed/first_boot.py +++ b/modules/installed/first_boot.py @@ -52,7 +52,7 @@ class FirstBoot(PagePlugin): message += _("Invalid box name: %s") % config.valid_hostname(hostname) else: hostname = config.get_hostname() - if box_key: + if box_key: if self.valid_box_key_p(box_key): db['box_key'] = box_key else: @@ -68,11 +68,11 @@ class FirstBoot(PagePlugin): ## Update state to 1 and head there with sqlite_db(cfg.store_file, table="firstboot", autocommit=True) as db: db['state']=1 - raise cherrypy.InternalRedirect('/firstboot/state1') + raise cherrypy.InternalRedirect('firstboot/state1') main = "

Welcome. It looks like this FreedomBox isn't set up yet. We'll need to ask you a just few questions to get started.

" - form = Form(title="Welcome to Your FreedomBox!", - action="/firstboot", + form = Form(title="Welcome to Your FreedomBox!", + action="firstboot", name="whats_my_name", message=message) form.html("

For convenience, your FreedomBox needs a name. It should be something short that doesn't contain spaces or punctuation. 'Willard' would be a good name. 'Freestyle McFreedomBox!!!' would not.

") @@ -106,16 +106,16 @@ TODO: explain all this cert stuff to the user.

with sqlite_db(cfg.store_file, table="firstboot", autocommit=True) as db: db['state']=5 main = main + """ -

Welcome screen not completely implemented yet. Press continue to +

Welcome screen not completely implemented yet. Press continue to see the rest of the web interface.

" """ - + if False: ## Update state to 2 and head there with sqlite_db(cfg.store_file, table="firstboot", autocommit=True) as db: db['state']=1 #TODO: switch to HTTPS - raise cherrypy.InternalRedirect('/firstboot/state1') + raise cherrypy.InternalRedirect('firstboot/state1') return self.fill_template(template="base", title=_("Installing the Certificate"), main=main, sidebar_right=_("""Getting Help

We've done our best to make your FreedomBox easy to use. If you have questions during setup, there are a few places to turn for help. TODO: add links to such help.

""")) diff --git a/plinth.py b/plinth.py index 314d40dc0..b743cca4b 100755 --- a/plinth.py +++ b/plinth.py @@ -58,14 +58,14 @@ class Root(plugin_mount.PagePlugin): ## TODO: firstboot hijacking root should probably be in the firstboot module with a hook in plinth.py with sqlite_db(cfg.store_file, table="firstboot") as db: if not 'state' in db: - raise cherrypy.InternalRedirect('/firstboot') + raise cherrypy.InternalRedirect('firstboot') elif db['state'] < 5: cfg.log("First Boot state = %d" % db['state']) - raise cherrypy.InternalRedirect('/firstboot/state%d' % db['state']) + raise cherrypy.InternalRedirect('firstboot/state%d' % db['state']) if cherrypy.session.get(cfg.session_key, None): - raise cherrypy.InternalRedirect('/router') + raise cherrypy.InternalRedirect('router') else: - raise cherrypy.InternalRedirect('/help/about') + raise cherrypy.InternalRedirect('help/about') def load_modules(): """Import all the symlinked .py files in the modules directory and