Package pyanaconda :: Package iw :: Module zipl_gui
[hide private]
[frames] | no frames]

Source Code for Module pyanaconda.iw.zipl_gui

  1  # 
  2  # zipl_gui.py 
  3  # 
  4  # Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006  Red Hat, Inc. 
  5  # All rights reserved. 
  6  # 
  7  # This program is free software; you can redistribute it and/or modify 
  8  # it under the terms of the GNU General Public License as published by 
  9  # the Free Software Foundation; either version 2 of the License, or 
 10  # (at your option) any later version. 
 11  # 
 12  # This program is distributed in the hope that it will be useful, 
 13  # but WITHOUT ANY WARRANTY; without even the implied warranty of 
 14  # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 15  # GNU General Public License for more details. 
 16  # 
 17  # You should have received a copy of the GNU General Public License 
 18  # along with this program.  If not, see <http://www.gnu.org/licenses/>. 
 19  # 
 20   
 21  # must replace with explcit form so update disks will work 
 22  import gtk 
 23  import string 
 24  from iw_gui import * 
 25  from pyanaconda.constants import * 
 26  from pyanaconda.storage.dasd import getDasdPorts 
 27  import gettext 
 28  _ = lambda x: gettext.ldgettext("anaconda", x) 
 29   
30 -class ZiplWindow (InstallWindow):
31 checkMark = None 32 checkMark_Off = None 33
34 - def __init__ (self, ics):
35 InstallWindow.__init__ (self, ics) 36 self.ics.setTitle ("z/IPL") 37 self.ics.windowTitle = N_("z/IPL Boot Loader Configuration")
38
39 - def getPrev (self):
40 # avoid coming back in here if the user backs past and then tries 41 # to skip this screen 42 pass
43
44 - def getNext (self):
45 self.bl.boot_args.update(self.kernelEntry.get_text().split())
46 47 # ZiplWindow tag="zipl"
48 - def getScreen(self, anaconda):
49 self.dispatch = anaconda.dispatch 50 self.bl = anaconda.bootloader 51 self.intf = anaconda.intf 52 53 box = gtk.VBox(False, 5) 54 box.set_border_width(5) 55 56 label = gtk.Label(_("The z/IPL boot loader will be installed on your " 57 "system.")) 58 label = gtk.Label(_("The z/IPL Boot Loader will now be installed " 59 "on your system." 60 "\n" 61 "\n" 62 "The root partition will be the one you " 63 "selected previously in the partition setup." 64 "\n" 65 "\n" 66 "The kernel used to start the machine will be " 67 "the one to be installed by default." 68 "\n" 69 "\n" 70 "If you wish to make changes later after " 71 "the installation feel free to change the " 72 "/etc/zipl.conf configuration file." 73 "\n" 74 "\n" 75 "You can now enter any additional kernel parameters " 76 "which your machine or your setup may require.")) 77 label.set_size_request(500, -1) 78 label.set_line_wrap(True) 79 label.set_alignment(0.0, 0.0) 80 label.set_padding(50,50) 81 box.pack_start(label, False) 82 83 box.pack_start (gtk.HSeparator (), False) 84 85 label = gtk.Label(_("Kernel Parameters") + ":") 86 label.set_alignment(0.0, 0.5) 87 self.kernelEntry = gtk.Entry() 88 89 if self.bl.args and self.bl.boot_args: 90 kernelparms = str(self.bl.args) 91 else: 92 kernelparms = "" 93 if getDasdPorts() and (kernelparms.find("dasd=") == -1): 94 if len(kernelparms) > 0: 95 kernelparms = "%s dasd=%s" %(kernelparms, getDasdPorts()) 96 else: 97 kernelparms = "dasd=%s" %(getDasdPorts(),) 98 self.kernelEntry.set_text(kernelparms) 99 100 hbox = gtk.HBox(False, 5) 101 hbox.pack_start(label, False) 102 hbox.pack_start(self.kernelEntry) 103 box.pack_start(hbox, False) 104 105 return box
106