[PATCH master/rhel7-branch] fix inst.virtiolog (#1074499)
Will Woods
wwoods at redhat.com
Thu Sep 4 19:24:17 UTC 2014
'inst.virtiolog' got lost in the loaderectomy, so we only ever used the
default port name.
This commit makes us use the port name given by 'inst.virtiolog=<name>'
if it's present. Otherwise we use the default name, as always.
Also, clarify and add a link for more info in boot-options.txt.
---
docs/boot-options.txt | 7 ++++++-
pyanaconda/anaconda_log.py | 7 ++++---
2 files changed, 10 insertions(+), 4 deletions(-)
diff --git a/docs/boot-options.txt b/docs/boot-options.txt
index 983d9f2..07ead6e 100644
--- a/docs/boot-options.txt
+++ b/docs/boot-options.txt
@@ -312,9 +312,14 @@ Requires the remote syslog process to accept incoming connections.
=== inst.virtiolog ===
Forward logs through the named virtio port (a character device at
-`/dev/virtio-ports/<name>`). A port named `org.fedoraproject.anaconda.log.0`
+`/dev/virtio-ports/<name>`).
+
+If not provided, a port named `org.fedoraproject.anaconda.log.0`
will be used by default, if found.
+See https://fedoraproject.org/wiki/Anaconda/Logging for more info on setting
+up logging via virtio.
+
=== inst.zram ===
Forces/disables (on/off) usage of zRAM swap for the installation process.
diff --git a/pyanaconda/anaconda_log.py b/pyanaconda/anaconda_log.py
index 1cdf0da..56ae9c7 100644
--- a/pyanaconda/anaconda_log.py
+++ b/pyanaconda/anaconda_log.py
@@ -224,12 +224,13 @@ class AnacondaLog:
"""
TEMPLATE = "*.* %s;anaconda_syslog\n"
- if not os.path.exists(self.VIRTIO_PORT) \
- or not os.access(self.VIRTIO_PORT, os.W_OK):
+ vport = flags.cmdline.get('virtiolog', self.VIRTIO_PORT)
+
+ if not os.access(vport, os.W_OK):
return
with open(self.SYSLOG_CFGFILE, 'a') as cfgfile:
- cfgfile.write(TEMPLATE % (self.VIRTIO_PORT,))
+ cfgfile.write(TEMPLATE % (vport,))
self.restartSyslog()
--
1.9.3
More information about the anaconda-patches
mailing list