On Mon, 2014-02-24 at 15:00 -0500, Peter Jones wrote:
Previously we were only running this on GRUB 2 platforms, and we need
to
be doing it the same way everywhere.
Resolves: rhbz#814813
Signed-off-by: Peter Jones <pjones(a)redhat.com>
---
pyanaconda/bootloader.py | 19 +++++++++++++++++--
1 file changed, 17 insertions(+), 2 deletions(-)
diff --git a/pyanaconda/bootloader.py b/pyanaconda/bootloader.py
index c313b6a..8cee09e 100644
--- a/pyanaconda/bootloader.py
+++ b/pyanaconda/bootloader.py
@@ -932,11 +932,25 @@ class BootLoader(object):
except OSError as e:
log.error("failed to set config file permissions: %s" % e)
+ def add_crash_args(self):
+ buf = ""
+ if os.access("%s%s" % (ROOT_PATH,
"/usr/sbin/rhcrashkernel-param"), \
+ os.X_OK):
+ (pread, pwrite) = os.pipe()
+ os.close(pwrite)
+ buf = iutil.execWithCapture("/usr/sbin/rhcrashkernel-param", [],
+ stdin=pread,
+ root=ROOT_PATH)
+ os.close(pread)
+ self.boot_args.add(buf)
I believe this deserves a comment on the
"pipe magic" used.
Otherwise this looks good to me.
--
Vratislav Podzimek
Anaconda Rider | Red Hat, Inc. | Brno - Czech Republic