[kexec-tools/f17] fix firstboot to ensure kdump svc is disabled properly

Dave Young yangrr at fedoraproject.org
Fri Aug 31 02:26:31 UTC 2012


commit fb5460869ecfccf5f33db68a7c795d87e057b251
Author: Dave Young <dyoung at redhat.com>
Date:   Thu Aug 9 10:22:49 2012 +0800

    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 <nhorman at redhat.com>
    Date:   Thu Jul 29 15:52:00 2010 +0000
    
        Resolves: bz 594830
    
    Signed-off-by: Dave Young <dyoung at redhat.com>
    Acked-by: Vivek Goyal <vgoyal at redhat.com>

 firstboot_kdump.py |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
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))


More information about the scm-commits mailing list