]> git.ipfire.org Git - people/ms/bricklayer.git/commitdiff
unattended: Show a success message at the end of the process
authorMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 17:53:20 +0000 (17:53 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Mon, 9 May 2022 17:53:20 +0000 (17:53 +0000)
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
src/python/step.py

index 7554d61fae28bd350efb0a9307574ad443369a9a..9af20b33889e52ab598a5dd37b5561812d67508d 100644 (file)
@@ -155,24 +155,30 @@ class Welcome(InteractiveStep):
                os.environ["LANGUAGE"] = lang
 
 
-class Congratulations(InteractiveStep):
+class Congratulations(Step):
        """
                Shows a message that the installation is complete
        """
        first_install = True
 
        def run(self):
-               self.tui.message(
-                       _("Congratulations"),
-                       _(
+               if self.bricklayer.unattended:
+                       message = _("The unattended installation process has been completed.")
+               else:
+                       message = _(
                                "The installation has been completed successfully."
                                "\n\n"
                                "You can now safely remove any media used for the installation."
-                       ),
-                       buttons=[_("Finish")],
+                       )
+
+               self.tui.message(
+                       _("Congratulations"), message, buttons=[_("Finish")],
 
                        # Make the window a litte bit bigger
                        width=50,
+
+                       # Automatically continue in unattended mode
+                       timeout=10 if self.bricklayer.unattended else None,
                )
 
 
@@ -183,8 +189,6 @@ class UnattendedWarning(UnattendedStep):
 
                message = _(
                        "The unattended installation will start in %(timeout)s seconds using %(disks)s",
-                       "The unattended installation will start in %(timeout)s seconds using %(disks)s",
-                       len(disks),
                ) % {
                        "timeout" : timeout,
                        "disks"   : i18n.list(disks),