aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBryn M. Reeves <bmr@redhat.com>2014-09-18 20:24:55 +0100
committerBryn M. Reeves <bmr@redhat.com>2014-09-18 20:24:55 +0100
commit7c8e3f3a429b891eb7bb16ef245ee28ae8035b69 (patch)
tree0a69094cb79e288f454bbf3a1eaf6caf6ab2ba70
parentef74a5bd22baea04b292e458de1be6b4980b6999 (diff)
downloadsos-7c8e3f3a429b891eb7bb16ef245ee28ae8035b69.tar.gz
[general] collect 'hostname' as well as 'hostname -f'
The --fqdn option to hostname depends on the system resolver configuration. On hosts where the fqdn is undefined the command may return: "hostname: Name or service not known" Since hostname will at least give the locally configured name regardless of resolver or DNS state collect both commands. Fixes #404. Signed-off-by: Bryn M. Reeves <bmr@redhat.com>
-rw-r--r--sos/plugins/general.py7
1 files changed, 2 insertions, 5 deletions
diff --git a/sos/plugins/general.py b/sos/plugins/general.py
index 6fae0367..070bff78 100644
--- a/sos/plugins/general.py
+++ b/sos/plugins/general.py
@@ -32,11 +32,8 @@ class General(Plugin):
"/etc/os-release"
])
- self.add_cmd_output(
- "hostname -f",
- root_symlink="hostname",
- suggest_filename="hostname"
- )
+ self.add_cmd_output("hostname -f")
+ self.add_cmd_output("hostname", root_symlink=hostname)
self.add_cmd_output("date", root_symlink="date")
self.add_cmd_output("uptime", root_symlink="uptime")