Fixing firstboot module
This commit is contained in:
parent
0376606424
commit
9487d3dfb1
@ -31,17 +31,24 @@ import os.path
|
|||||||
import time
|
import time
|
||||||
import gtk
|
import gtk
|
||||||
import gobject
|
import gobject
|
||||||
import functions
|
|
||||||
import commands
|
import commands
|
||||||
import rhpl.executil as executil
|
import rhpl.executil as executil
|
||||||
from firstboot import start_process
|
from firstboot.config import *
|
||||||
|
from firstboot.constants import *
|
||||||
|
from firstboot.functions import *
|
||||||
|
from firstboot.module import *
|
||||||
|
|
||||||
from rhpl.translate import _, N_
|
from rhpl.translate import _, N_
|
||||||
from rhpl import translate
|
from rhpl import translate
|
||||||
translate.textdomain("firstboot")
|
translate.textdomain("firstboot")
|
||||||
|
|
||||||
|
class moduleClass(Module):
|
||||||
|
def __init__(self):
|
||||||
|
Module.__init__(self)
|
||||||
|
self.priority = 100
|
||||||
|
self.sidebarTitle = N_("Kdump")
|
||||||
|
self.title = N_("Kdump")
|
||||||
|
|
||||||
class childWindow:
|
|
||||||
# runPriority determines the order in which this module runs in firstboot
|
# runPriority determines the order in which this module runs in firstboot
|
||||||
runPriority = 70
|
runPriority = 70
|
||||||
moduleName = _("Kdump")
|
moduleName = _("Kdump")
|
||||||
@ -87,7 +94,7 @@ class childWindow:
|
|||||||
self.bootloader = name
|
self.bootloader = name
|
||||||
return self.bootloader
|
return self.bootloader
|
||||||
|
|
||||||
def launch(self, doDebug = None):
|
def createScreen(self, doDebug = None):
|
||||||
self.doDebug = doDebug
|
self.doDebug = doDebug
|
||||||
|
|
||||||
if doDebug:
|
if doDebug:
|
||||||
@ -215,7 +222,7 @@ class childWindow:
|
|||||||
self.vbox = gtk.VBox()
|
self.vbox = gtk.VBox()
|
||||||
self.vbox.set_size_request(400, 200)
|
self.vbox.set_size_request(400, 200)
|
||||||
|
|
||||||
title_pix = functions.imageFromFile("workstation.png")
|
# title_pix = loadPixbuf("workstation.png")
|
||||||
|
|
||||||
internalVBox = gtk.VBox()
|
internalVBox = gtk.VBox()
|
||||||
internalVBox.set_border_width(10)
|
internalVBox.set_border_width(10)
|
||||||
@ -258,8 +265,6 @@ class childWindow:
|
|||||||
|
|
||||||
self.vbox.pack_start(internalVBox, False, 15)
|
self.vbox.pack_start(internalVBox, False, 15)
|
||||||
|
|
||||||
return self.vbox, title_pix, self.moduleName
|
|
||||||
|
|
||||||
def grabFocus(self):
|
def grabFocus(self):
|
||||||
self.enableKdumpCheck.grab_focus()
|
self.enableKdumpCheck.grab_focus()
|
||||||
|
|
||||||
@ -284,19 +289,19 @@ class childWindow:
|
|||||||
self.showErrorMessage(_("Sorry, your system does not have enough memory for kdump to be viable!"))
|
self.showErrorMessage(_("Sorry, your system does not have enough memory for kdump to be viable!"))
|
||||||
self.enableKdumpCheck.set_active(False)
|
self.enableKdumpCheck.set_active(False)
|
||||||
self.showHide(False)
|
self.showHide(False)
|
||||||
return 0
|
return RESULT_FAILURE
|
||||||
# Alert user that we're not going to turn on kdump if they're running a xen kernel
|
# Alert user that we're not going to turn on kdump if they're running a xen kernel
|
||||||
elif self.xenKernel != -1 and self.kdumpEnabled:
|
elif self.xenKernel != -1 and self.kdumpEnabled:
|
||||||
self.showErrorMessage(_("Sorry, Xen kernels do not support kdump at this time!"))
|
self.showErrorMessage(_("Sorry, Xen kernels do not support kdump at this time!"))
|
||||||
self.enableKdumpCheck.set_active(False)
|
self.enableKdumpCheck.set_active(False)
|
||||||
self.showHide(False)
|
self.showHide(False)
|
||||||
return 0
|
return RESULT_FAILURE
|
||||||
# If there's no kdump support on this arch, let the user know and don't configure
|
# If there's no kdump support on this arch, let the user know and don't configure
|
||||||
elif self.arch in self.unsupportedArches:
|
elif self.arch in self.unsupportedArches:
|
||||||
self.showErrorMessage(_("Sorry, the %s architecture does not support kdump at this time!" % self.arch))
|
self.showErrorMessage(_("Sorry, the %s architecture does not support kdump at this time!" % self.arch))
|
||||||
self.enableKdumpCheck.set_active(False)
|
self.enableKdumpCheck.set_active(False)
|
||||||
self.showHide(False)
|
self.showHide(False)
|
||||||
return 0
|
return RESULT_FAILURE
|
||||||
|
|
||||||
# If running on an arch w/a separate kernel-kdump (i.e., non-relocatable kernel), check to
|
# If running on an arch w/a separate kernel-kdump (i.e., non-relocatable kernel), check to
|
||||||
# see that its installed, otherwise, alert the user they need to install it, and give them
|
# see that its installed, otherwise, alert the user they need to install it, and give them
|
||||||
@ -321,7 +326,7 @@ class childWindow:
|
|||||||
|
|
||||||
if rc == gtk.RESPONSE_NO:
|
if rc == gtk.RESPONSE_NO:
|
||||||
self.needsReboot = False
|
self.needsReboot = False
|
||||||
return None
|
return RESULT_SUCCESS
|
||||||
else:
|
else:
|
||||||
self.needsReboot = True
|
self.needsReboot = True
|
||||||
|
|
||||||
@ -330,7 +335,7 @@ class childWindow:
|
|||||||
self.showErrorMessage(_("Error! No bootloader config file found, aborting configuration!"))
|
self.showErrorMessage(_("Error! No bootloader config file found, aborting configuration!"))
|
||||||
self.enableKdumpCheck.set_active(False)
|
self.enableKdumpCheck.set_active(False)
|
||||||
self.showHide(False)
|
self.showHide(False)
|
||||||
return 0
|
return RESULT_FAILURE
|
||||||
else:
|
else:
|
||||||
self.offset = self.bootloaders[self.bootloader][1]
|
self.offset = self.bootloaders[self.bootloader][1]
|
||||||
|
|
||||||
@ -356,7 +361,7 @@ class childWindow:
|
|||||||
self.needsReboot = False
|
self.needsReboot = False
|
||||||
|
|
||||||
|
|
||||||
return 0
|
return RESULT_SUCCESS
|
||||||
|
|
||||||
def showErrorMessage(self, text):
|
def showErrorMessage(self, text):
|
||||||
dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, text)
|
dlg = gtk.MessageDialog(None, 0, gtk.MESSAGE_ERROR, gtk.BUTTONS_OK, text)
|
||||||
@ -365,3 +370,7 @@ class childWindow:
|
|||||||
rc = dlg.run()
|
rc = dlg.run()
|
||||||
dlg.destroy()
|
dlg.destroy()
|
||||||
return None
|
return None
|
||||||
|
|
||||||
|
def initializeUI(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
Name: kexec-tools
|
Name: kexec-tools
|
||||||
Version: 2.0.0
|
Version: 2.0.0
|
||||||
Release: 15%{?dist}
|
Release: 16%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Applications/System
|
Group: Applications/System
|
||||||
Summary: The kexec/kdump userspace component.
|
Summary: The kexec/kdump userspace component.
|
||||||
@ -256,6 +256,9 @@ done
|
|||||||
|
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Wed Jun 23 2009 Neil Horman <nhorman@redhat.com> 2.0.0-16
|
||||||
|
- Fix up kdump so it works with latest firstboot
|
||||||
|
|
||||||
* Mon Jun 15 2009 Neil Horman <nhorman@redhat.com> 2.0.0-15
|
* Mon Jun 15 2009 Neil Horman <nhorman@redhat.com> 2.0.0-15
|
||||||
- Fixed some stat drive detect bugs by E. Biederman (bz505701)
|
- Fixed some stat drive detect bugs by E. Biederman (bz505701)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user