From 752aaaa48cdba19246b31a0383ba2f7539e6e493 Mon Sep 17 00:00:00 2001 From: Dave Young Date: Thu, 9 Aug 2012 10:22:49 +0800 Subject: [PATCH] fix firstboot to ensure kdump svc is disabled properly Resolves: bz805782 in case kdump is disabled, we also need to disable the kdump service This patch is ported from below rhel patch, changed below two issues though: 1. fixed the systemctl line 2. dropped an useless line for using 0 for gtk adjustment page_size field. see http://www.pygtk.org/pygtk2tutorial/sec-SpinButtons.html for the field doc. Rhel6 commit is below: commit c5735dee743fa41d14635fe2fbf5f48264bc36f6 Author: nhorman Date: Thu Jul 29 15:52:00 2010 +0000 Resolves: bz 594830 Signed-off-by: Dave Young Acked-by: Vivek Goyal --- firstboot_kdump.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/firstboot_kdump.py b/firstboot_kdump.py index bbcb9c4..2a3da7c 100755 --- a/firstboot_kdump.py +++ b/firstboot_kdump.py @@ -299,6 +299,11 @@ class moduleClass(Module): else: print "Kdump will be disabled" + # Regardless of what else happens we need to be sure to disalbe kdump if its disabled here, or + # else it will fail during startup + if (self.enableKdumpCheck.get_active() == False): + os.system("/bin/systemctl disable kdump.service") + # If the user simply doesn't have enough memory for kdump to be viable/supportable, tell 'em if self.enoughMem is False and self.kdumpEnabled: self.showErrorMessage(_("Sorry, your system does not have enough memory for kdump to be viable!")) @@ -365,6 +370,7 @@ class moduleClass(Module): if self.doDebug: print "Using %s bootloader with %iM offset" % (self.bootloader, self.offset) print "Grubby command would be:\n %s" % grubbyCmd + print "chkconfig status is %s" % chkconfigStatus else: os.system(grubbyCmd) os.system("/bin/systemctl %s kdump.service" % (chkconfigStatus))