[PATCH] Provide useful hints on TTY1 during the installation

Martin Kolman mkolman at redhat.com
Tue Nov 18 14:27:00 UTC 2014


Until now TTY1 was not really used for anything other than printing
current Anaconda version. This has been changed and the Anaconda
version is now followed by useful hints for Anaconda users with
special emphasis of Anaconda debugging (where are the log files stored,
how can I get a shell, etc.).

The hints are also parametrized to be displayed only when appropriate
(no need to tell users that Anaconda has a text mode if they already
are in textmode) and are translatable.

Signed-off-by: Martin Kolman <mkolman at redhat.com>
---
 anaconda | 28 ++++++++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/anaconda b/anaconda
index a3f527c..301cfbd 100755
--- a/anaconda
+++ b/anaconda
@@ -988,11 +988,39 @@ if __name__ == "__main__":
 
     verdesc = "%s for %s %s" % (getAnacondaVersionString(),
                                 product.productName, product.productVersion)
+
+    logs_note = " * installation log files are stored in /tmp during the installation"
+    shell_note = " * shell is available on TTY2 and in second TMUX pane (ctrl+b, then press 2)"
+    tmux_only_note = " * shell is available in second TMUX pane (ctrl+b, then press 2)"
+    text_mode_note = " * if the graphical installation interface fails to start, try again with the\n"\
+                     "   inst.text bootoption to start text installation"
+    separate_attachements_note = " * when reporting a bug attach logs as separate text/plain attachments"
+
     if product.isFinal:
         print("anaconda %s started." % verdesc)
     else:
         print("anaconda %s (pre-release) started." % verdesc)
 
+    # we are past the --version and --help shortcut so we can import Blivet
+    # now without slowing down anything critical
+
+    # pylint: disable=import-error
+    from blivet import arch
+
+    if not opts.images and not opts.dirinstall:
+        print(logs_note)
+        # no fancy stuff like TTYs on a s390...
+        if not arch.isS390():
+            print(shell_note)
+        # ...but there is apparently TMUX during the manual installation!
+        elif not opts.ksfile:
+            print(tmux_only_note)
+        # no need to tell users how to switch to text mode
+        # if already in text mode
+        if opts.display_mode == 'g':
+            print(text_mode_note)
+        print(separate_attachements_note)
+
     from pyanaconda.anaconda import Anaconda
     anaconda = Anaconda()
     iutil.setup_translations(gettext)
-- 
1.9.3



More information about the anaconda-patches mailing list