|
|
629484 |
commit 93ddb343c48d7158f34c0e5e8f016b2798a078e8
|
|
|
629484 |
Author: Bryn M. Reeves <bmr@redhat.com>
|
|
|
629484 |
Date: Fri Jan 24 15:42:53 2014 +0000
|
|
|
629484 |
|
|
|
629484 |
Tidy up formatting of UI preamble text
|
|
|
629484 |
|
|
|
629484 |
The formatting of the template preamble used a narrow terminal
|
|
|
629484 |
width since there is no native python method for obtaining the
|
|
|
629484 |
actual terminal geometry and the common methods for doing this
|
|
|
629484 |
are non-portable (e.g. Windows specific ioctls or shelling out
|
|
|
629484 |
to stty).
|
|
|
629484 |
|
|
|
629484 |
This causes the top of the message to scroll off the screen on
|
|
|
629484 |
a standard 80x25 terminal (e.g. putty or a non-resized
|
|
|
629484 |
gnome-terminal or xterm window).
|
|
|
629484 |
|
|
|
629484 |
Remove the paragraph indentation and increase the assumed width
|
|
|
629484 |
from 58 to 72 chars. This causes the message to fill a standard
|
|
|
629484 |
80x25 terminal without scrolling.
|
|
|
629484 |
|
|
|
629484 |
Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
|
|
|
629484 |
|
|
|
629484 |
diff --git a/sos/policies/__init__.py b/sos/policies/__init__.py
|
|
|
629484 |
index 47ace5c..c9cfd21 100644
|
|
|
629484 |
--- a/sos/policies/__init__.py
|
|
|
629484 |
+++ b/sos/policies/__init__.py
|
|
|
629484 |
@@ -115,17 +115,21 @@ class PackageManager(object):
|
|
|
629484 |
class Policy(object):
|
|
|
629484 |
|
|
|
629484 |
msg = _("""\
|
|
|
629484 |
-This command will collect system configuration and diagnostic information \
|
|
|
629484 |
-from this %(distro)s system. An archive containing the collected information \
|
|
|
629484 |
-will be generated in %(tmpdir)s.
|
|
|
629484 |
+This command will collect diagnostic and configuration \
|
|
|
629484 |
+information from this %(distro)s system and installed \
|
|
|
629484 |
+applications.
|
|
|
629484 |
|
|
|
629484 |
-For more information on %(vendor)s visit:
|
|
|
629484 |
+An archive containing the collected information will be \
|
|
|
629484 |
+generated in %(tmpdir)s and may be provided to a %(vendor)s \
|
|
|
629484 |
+support representative.
|
|
|
629484 |
|
|
|
629484 |
+Any information provided to %(vendor)s will be treated in \
|
|
|
629484 |
+accordance with the published support policies at:\n
|
|
|
629484 |
%(vendor_url)s
|
|
|
629484 |
|
|
|
629484 |
-The generated archive may contain data considered sensitive and its content \
|
|
|
629484 |
-should be reviewed by the originating organization before being passed to \
|
|
|
629484 |
-any third party.
|
|
|
629484 |
+The generated archive may contain data considered sensitive \
|
|
|
629484 |
+and its content should be reviewed by the originating \
|
|
|
629484 |
+organization before being passed to any third party.
|
|
|
629484 |
|
|
|
629484 |
No changes will be made to system configuration.
|
|
|
629484 |
%(vendor_text)s
|
|
|
629484 |
@@ -296,14 +300,14 @@ No changes will be made to system configuration.
|
|
|
629484 |
the user in non-batch mode. If your policy sets self.distro that
|
|
|
629484 |
text will be substituted accordingly. You can also override this
|
|
|
629484 |
method to do something more complicated."""
|
|
|
629484 |
- width = 58
|
|
|
629484 |
+ width = 72
|
|
|
629484 |
_msg = self.msg % {'distro': self.distro, 'vendor': self.vendor,
|
|
|
629484 |
'vendor_url': self.vendor_url,
|
|
|
629484 |
'vendor_text': self.vendor_text,
|
|
|
629484 |
'tmpdir': self.commons['tmpdir']}
|
|
|
629484 |
_fmt = ""
|
|
|
629484 |
for line in _msg.splitlines():
|
|
|
629484 |
- _fmt = _fmt + fill(" " + line, width, replace_whitespace = False) + '\n'
|
|
|
629484 |
+ _fmt = _fmt + fill(line, width, replace_whitespace = False) + '\n'
|
|
|
629484 |
return _fmt
|
|
|
629484 |
|
|
|
629484 |
|
|
|
629484 |
diff --git a/sos/policies/redhat.py b/sos/policies/redhat.py
|
|
|
629484 |
index 9321815..5b3a446 100644
|
|
|
629484 |
--- a/sos/policies/redhat.py
|
|
|
629484 |
+++ b/sos/policies/redhat.py
|
|
|
629484 |
@@ -91,26 +91,6 @@ class RedHatPolicy(LinuxPolicy):
|
|
|
629484 |
return self.host_name()
|
|
|
629484 |
|
|
|
629484 |
class RHELPolicy(RedHatPolicy):
|
|
|
629484 |
-
|
|
|
629484 |
- msg = _("""\
|
|
|
629484 |
-This command will collect system configuration and diagnostic information \
|
|
|
629484 |
-from this %(distro)s system. An archive containing the collected information \
|
|
|
629484 |
-will be generated in %(tmpdir)s and may be provided to a %(vendor)s support \
|
|
|
629484 |
-representative or used for local diagnostic or recording purposes.
|
|
|
629484 |
-
|
|
|
629484 |
-Any information provided to %(vendor)s will be treated in strict confidence \
|
|
|
629484 |
-in accordance with the published support policies at:
|
|
|
629484 |
-
|
|
|
629484 |
- %(vendor_url)s
|
|
|
629484 |
-
|
|
|
629484 |
-The generated archive may contain data considered sensitive and its content \
|
|
|
629484 |
-should be reviewed by the originating organization before being passed to \
|
|
|
629484 |
-any third party.
|
|
|
629484 |
-
|
|
|
629484 |
-No changes will be made to system configuration.
|
|
|
629484 |
-%(vendor_text)s
|
|
|
629484 |
-""")
|
|
|
629484 |
-
|
|
|
629484 |
distro = "Red Hat Enterprise Linux"
|
|
|
629484 |
vendor = "Red Hat"
|
|
|
629484 |
vendor_url = "https://access.redhat.com/support/"
|