Mark firstboot complete as soon as we've called create-user

Otherwish if you reboot while still on the final screen you end up in
console-conf again.
This commit is contained in:
Michael Hudson-Doyle 2016-09-16 14:41:56 +12:00
parent 6161967459
commit 051c41cf7b
2 changed files with 4 additions and 4 deletions

View File

@ -20,7 +20,7 @@ from urwid import (Pile, Columns, Text, ListBox)
from subiquitycore.ui.buttons import done_btn, cancel_btn
from subiquitycore.ui.interactive import EmailEditor
from subiquitycore.ui.utils import Padding, Color
from subiquitycore.utils import run_command
from subiquitycore.utils import run_command, mark_firstboot_complete
from subiquitycore.view import BaseView
log = logging.getLogger("console_conf.views.identity")
@ -122,6 +122,9 @@ class IdentityView(BaseView):
self.error.set_text("Creating user failed:\n" + result['err'])
return
else:
# mark ourselves complete
mark_firstboot_complete()
data = json.loads(result['output'])
result = {
'realname': self.email.value,

View File

@ -120,9 +120,6 @@ class LoginView(BaseView):
def done(self, button):
if not self.opts.dry_run:
# mark ourselves complete
utils.mark_firstboot_complete()
# stop the console-conf services (this will kill the current process).
utils.disable_first_boot_service()