diff options
author | Erik Troan <ewt@redhat.com> | 1999-08-28 15:52:26 +0000 |
---|---|---|
committer | Erik Troan <ewt@redhat.com> | 1999-08-28 15:52:26 +0000 |
commit | 6d9c007e94a6e7eb15681838d41c33031a6690c4 (patch) | |
tree | 320831c5f294d1cd9459aad6ee0ef43363739a4b | |
parent | 4e72b77944ba4183f4ac64789ad010580553c4d5 (diff) | |
download | anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.tar.gz anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.tar.xz anaconda-6d9c007e94a6e7eb15681838d41c33031a6690c4.zip |
iutil.py
-rwxr-xr-x | anaconda | 2 | ||||
-rwxr-xr-x | gui.py | 2 | ||||
-rw-r--r-- | iutil.py | 9 | ||||
-rw-r--r-- | iw/installpath.py | 2 | ||||
-rw-r--r-- | po/anaconda-text.pot | 499 | ||||
-rw-r--r-- | text.py | 67 | ||||
-rw-r--r-- | todo.py | 39 |
7 files changed, 583 insertions, 37 deletions
@@ -156,7 +156,7 @@ if forceMount: try: todo = ToDo(intf, method, rootPath, installSystem = installPackages, setupFilesystems = setupFilesystems, mouse = mouseInfo) - intf.run(todo) + intf.run(todo, test = test) except: (type, value, tb) = sys.exc_info() from string import joinfields @@ -100,7 +100,7 @@ class InstallInterface: def getCongratulation (): return CongratulationWindow - def run (self, todo): + def run (self, todo, test = 0): gtkThread = GtkMainThread () gtkThread.start () @@ -20,7 +20,8 @@ def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2, childpid = os.fork() if (not childpid): - isys.chroot (root) + if (root != '/'): isys.chroot (root) + if stdin != 0: os.dup2(stdin, 0) os.close(stdin) @@ -41,7 +42,7 @@ def execWithRedirect(command, argv, stdin = 0, stdout = 1, stderr = 2, return status -def execWithCapture(command, argv, searchPath = 0, root = '/'): +def execWithCapture(command, argv, searchPath = 0, root = '/', stdin = 0): (read, write) = os.pipe() @@ -50,6 +51,10 @@ def execWithCapture(command, argv, searchPath = 0, root = '/'): if (root != '/'): isys.chroot (root) os.dup2(write, 1) + if stdin: + os.dup2(stdin, 0) + os.close(stdin) + if (searchPath): os.execvp(command, argv) else: diff --git a/iw/installpath.py b/iw/installpath.py index 5381123d8..d4307b6bc 100644 --- a/iw/installpath.py +++ b/iw/installpath.py @@ -39,7 +39,7 @@ class InstallPathWindow (InstallWindow): InstallPathWindow ] - self.installSteps = [ AccountWindow, PartitionWindow, + self.installSteps = [ PartitionWindow, LiloWindow, InstallTypeWindow, TimezoneWindow, diff --git a/po/anaconda-text.pot b/po/anaconda-text.pot new file mode 100644 index 000000000..8a13818a9 --- /dev/null +++ b/po/anaconda-text.pot @@ -0,0 +1,499 @@ +# SOME DESCRIPTIVE TITLE. +# Copyright (C) YEAR Free Software Foundation, Inc. +# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. +# +#, fuzzy +msgid "" +msgstr "" +"Project-Id-Version: PACKAGE VERSION\n" +"POT-Creation-Date: 1999-08-25 14:38-0400\n" +"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" +"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" +"Language-Team: LANGUAGE <LL@li.org>\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=CHARSET\n" +"Content-Transfer-Encoding: ENCODING\n" + +#: ../text.py:26 ../text.py:1005 +msgid "Language Selection" +msgstr "" + +#: ../text.py:27 +msgid "What language would you like to use during the installation process?" +msgstr "" + +#: ../text.py:29 ../text.py:77 ../text.py:128 ../text.py:176 ../text.py:229 +#: ../text.py:245 ../text.py:250 ../text.py:268 ../text.py:290 ../text.py:421 +#: ../text.py:441 ../text.py:472 ../text.py:527 ../text.py:567 ../text.py:632 +#: ../text.py:683 ../text.py:743 ../text.py:760 ../text.py:780 ../text.py:792 +#: ../text.py:804 ../text.py:972 ../text.py:978 +msgid "OK" +msgstr "" + +#: ../text.py:41 +msgid "/dev/ttyS0 (COM1 under DOS)" +msgstr "" + +#: ../text.py:42 +msgid "/dev/ttyS1 (COM2 under DOS)" +msgstr "" + +#: ../text.py:43 +msgid "/dev/ttyS2 (COM3 under DOS)" +msgstr "" + +#: ../text.py:44 +msgid "/dev/ttyS3 (COM4 under DOS)" +msgstr "" + +#: ../text.py:59 +msgid "Device" +msgstr "" + +#: ../text.py:60 +#, c-format +msgid "What device is your mouse located on? %s %i" +msgstr "" + +#: ../text.py:61 +msgid "Ok" +msgstr "" + +#: ../text.py:61 ../text.py:62 ../text.py:77 ../text.py:100 ../text.py:128 +#: ../text.py:131 ../text.py:142 ../text.py:144 ../text.py:162 ../text.py:176 +#: ../text.py:178 ../text.py:197 ../text.py:199 ../text.py:229 ../text.py:268 +#: ../text.py:270 ../text.py:290 ../text.py:421 ../text.py:472 ../text.py:474 +#: ../text.py:527 ../text.py:567 ../text.py:632 ../text.py:683 ../text.py:692 +#: ../text.py:708 ../text.py:717 ../text.py:743 ../text.py:750 ../text.py:760 +#: ../text.py:761 +msgid "Back" +msgstr "" + +#: ../text.py:79 +msgid "Which model mouse is attached to this computer?" +msgstr "" + +#: ../text.py:88 +msgid "Emulate 3 Buttons?" +msgstr "" + +#: ../text.py:90 +msgid "Mouse Selection" +msgstr "" + +#: ../text.py:126 ../text.py:1006 +msgid "Keyboard Selection" +msgstr "" + +#: ../text.py:127 +msgid "Which model keyboard is attached to this computer?" +msgstr "" + +#: ../text.py:138 ../text.py:1008 +msgid "Installation Path" +msgstr "" + +#: ../text.py:139 +msgid "" +"Would you like to install a new system or upgrade a system which already " +"contains Red Hat Linux 2.0 or later?" +msgstr "" + +#: ../text.py:142 +msgid "Install" +msgstr "" + +#: ../text.py:142 ../text.py:146 +msgid "Upgrade" +msgstr "" + +#: ../text.py:159 ../text.py:800 +msgid "Error" +msgstr "" + +#: ../text.py:160 +msgid "You don't have any Linux partitions. You can't upgrade this system!" +msgstr "" + +#: ../text.py:173 +msgid "System to Upgrade" +msgstr "" + +#: ../text.py:174 +msgid "What partition holds the root partition of your installation?" +msgstr "" + +#: ../text.py:189 +msgid "Customize Packages to Upgrade" +msgstr "" + +#: ../text.py:190 +msgid "" +"The packages you have installed, and any other packages which are needed to " +"satisfy their dependencies, have been selected for installation. Would you " +"like to customize the set of packages that will be upgraded?" +msgstr "" + +#: ../text.py:197 ../text.py:708 ../text.py:711 +msgid "Yes" +msgstr "" + +#: ../text.py:197 ../text.py:202 ../text.py:708 ../text.py:714 +msgid "No" +msgstr "" + +#: ../text.py:212 ../text.py:1022 +msgid "Root Password" +msgstr "" + +#: ../text.py:214 +msgid "" +"Pick a root password. You must type it twice to ensure you know what it is " +"and didn't make a mistake in typing. Remember that the root password is a " +"critical part of system security!" +msgstr "" + +#: ../text.py:223 +msgid "Password:" +msgstr "" + +#: ../text.py:224 +msgid "Password (again):" +msgstr "" + +#: ../text.py:242 +msgid "Password Length" +msgstr "" + +#: ../text.py:243 +msgid "The root password must be at least 6 characters long." +msgstr "" + +#: ../text.py:247 +msgid "Password Mismatch" +msgstr "" + +#: ../text.py:248 +msgid "The passwords you entered were different. Please try again." +msgstr "" + +#: ../text.py:259 +msgid "Red Hat Linux" +msgstr "" + +#: ../text.py:260 +msgid "" +"Welcome to Red Hat Linux!\n" +"\n" +"This installation process is outlined in detail in the Official Red Hat " +"Linux Installation Guide available from Red Hat Software. If you have access " +"to this manual, you should read the installation section before continuing.\n" +"\n" +"If you have purchased Official Red Hat Linux, be sure to register your " +"purchase through our web site, http://www.redhat.com/." +msgstr "" + +#: ../text.py:292 +msgid "Authentication Configuration" +msgstr "" + +#: ../text.py:293 +msgid "Use Shadow Passwords" +msgstr "" + +#: ../text.py:295 +msgid "Enable MD5 Passwords" +msgstr "" + +#: ../text.py:297 +msgid "Enable NIS" +msgstr "" + +#: ../text.py:302 +msgid "NIS Domain:" +msgstr "" + +#: ../text.py:304 +msgid "NIS Server:" +msgstr "" + +#: ../text.py:306 +msgid "or use:" +msgstr "" + +#: ../text.py:309 +msgid "Request server via broadcast" +msgstr "" + +#: ../text.py:393 +msgid "Use bootp/dhcp" +msgstr "" + +#: ../text.py:398 +msgid "IP address:" +msgstr "" + +#: ../text.py:399 +msgid "Netmask:" +msgstr "" + +#: ../text.py:400 +msgid "Default gateway (IP):" +msgstr "" + +#: ../text.py:401 +msgid "Primary nameserver:" +msgstr "" + +#: ../text.py:423 +msgid "Network Configuration" +msgstr "" + +#: ../text.py:439 +msgid "Invalid information" +msgstr "" + +#: ../text.py:440 +msgid "You must enter valid IP information to continue" +msgstr "" + +#: ../text.py:468 +msgid "Hostname Configuration" +msgstr "" + +#: ../text.py:469 +msgid "" +"The hostname is the name of your computer. If your computer is attached to " +"a network, this may be assigned by your network administrator." +msgstr "" + +#: ../text.py:472 +msgid "Hostname" +msgstr "" + +#: ../text.py:505 +msgid "" +"What partitions would you like to format? We strongly suggest formatting all " +"of the system partitions, including /, /usr, and /var. There is no need to " +"format /home or /usr/local if they have already been configured during a " +"previous install." +msgstr "" + +#: ../text.py:525 +msgid "Check for bad blocks during format" +msgstr "" + +#: ../text.py:529 +msgid "Choose Partitions to Format" +msgstr "" + +#: ../text.py:565 +msgid "Select individual packages" +msgstr "" + +#: ../text.py:569 ../text.py:634 +msgid "Package Group Selection" +msgstr "" + +#: ../text.py:661 +msgid "Package Dependencies" +msgstr "" + +#: ../text.py:662 +msgid "" +"Some of the packages you have selected to install require packages you have " +"not selected. If you just select Ok all of those required packages will be " +"installed." +msgstr "" + +#: ../text.py:668 +msgid "Package" +msgstr "" + +#: ../text.py:668 +msgid "Requirement" +msgstr "" + +#: ../text.py:680 +msgid "Install packages to satisfy dependencies" +msgstr "" + +#: ../text.py:698 ../text.py:788 ../text.py:1027 +msgid "Bootdisk" +msgstr "" + +#: ../text.py:699 +msgid "" +"A custom bootdisk provides a way of booting into your Linux system without " +"depending on the normal bootloader. This is useful if you don't want to " +"install lilo on your system, another operating system removes lilo, or lilo " +"doesn't work with your hardware configuration. A custom bootdisk can also be " +"used with the Red Hat rescue image, making it much easier to recover from " +"severe system failures.\n" +"\n" +"Would you like to create a bootdisk for your system?" +msgstr "" + +#: ../text.py:740 ../text.py:1024 +msgid "LILO Configuration" +msgstr "" + +#: ../text.py:741 +msgid "Where do you want to install the bootloader?" +msgstr "" + +#: ../text.py:756 +msgid "Installation to begin" +msgstr "" + +#: ../text.py:757 +msgid "" +"A complete log of your installation will be in /tmp/install.log after " +"rebooting your system. You may want to keep this file for later reference." +msgstr "" + +#: ../text.py:772 +msgid "Complete" +msgstr "" + +#: ../text.py:773 +msgid "" +"Congratulations, installation is complete.\n" +"\n" +"Remove the boot media and press return to reboot. For information on fixes " +"which are available for this release of Red Hat Linux, consult the Errata " +"available from http://www.redhat.com.\n" +"\n" +"Information on configuring your system is available in the post install " +"chapter of the Official Red Hat Linux User's Guide." +msgstr "" + +#: ../text.py:789 +msgid "" +"Insert a blank floppy in the first floppy drive. All data on this disk will " +"be erased during creation of the boot disk." +msgstr "" + +#: ../text.py:792 ../text.py:793 ../text.py:804 ../text.py:805 +msgid "Skip" +msgstr "" + +#: ../text.py:801 +msgid "" +"An error occured while making the boot disk. Please make sure that there is " +"a formatted floppy in the first floppy drive." +msgstr "" + +#: ../text.py:863 +msgid "Package Installation" +msgstr "" + +#: ../text.py:865 +msgid "Name : " +msgstr "" + +#: ../text.py:866 +msgid "Size : " +msgstr "" + +#: ../text.py:867 +msgid "Summary: " +msgstr "" + +#: ../text.py:893 +msgid " Packages" +msgstr "" + +#: ../text.py:894 +msgid " Bytes" +msgstr "" + +#: ../text.py:895 +msgid " Time" +msgstr "" + +#: ../text.py:897 +msgid "Total :" +msgstr "" + +#: ../text.py:904 +msgid "Completed: " +msgstr "" + +#: ../text.py:914 +msgid "Remaining: " +msgstr "" + +#: ../text.py:978 ../text.py:979 +msgid "Debug" +msgstr "" + +#: ../text.py:991 +msgid "Red Hat Linux (C) 1999 Red Hat, Inc." +msgstr "" + +#: ../text.py:993 +msgid "" +" <Tab>/<Alt-Tab> between elements | <Space> selects | <F12> next " +"screen" +msgstr "" + +#: ../text.py:1007 +msgid "Welcome" +msgstr "" + +#: ../text.py:1012 +msgid "Network Setup" +msgstr "" + +#: ../text.py:1014 +msgid "Partition" +msgstr "" + +#: ../text.py:1015 +msgid "Filesystem Formatting" +msgstr "" + +#: ../text.py:1019 ../text.py:1020 +msgid "Mouse Configuration" +msgstr "" + +#: ../text.py:1021 +msgid "Authentication" +msgstr "" + +#: ../text.py:1023 +msgid "Boot Disk" +msgstr "" + +#: ../text.py:1025 +msgid "Installation Begins" +msgstr "" + +#: ../text.py:1026 +msgid "Install System" +msgstr "" + +#: ../text.py:1028 +msgid "Installation Complete" +msgstr "" + +#: ../text.py:1032 +msgid "Examine System" +msgstr "" + +#: ../text.py:1033 +msgid "Customize Upgrade" +msgstr "" + +#: ../text.py:1034 +msgid "Individual Packages" +msgstr "" + +#: ../text.py:1035 +msgid "Upgrade System" +msgstr "" + +#: ../text.py:1036 +msgid "Upgrade Complete" +msgstr "" @@ -2,11 +2,11 @@ from snack import * import sys import isys import os +import iutil import rpm import time import gettext import glob -import _balkan from newtpyfsedit import fsedit INSTALL_OK = 0 @@ -78,7 +78,7 @@ class MouseWindow: bb = ButtonBar(screen, [_("OK"), _("Back")]) t = TextboxReflowed(30, _("Which model mouse is attached to this computer?")) - l = Listbox(8, scroll = 1, returnExit = 0, anchorLeft = 1) + l = Listbox(8, scroll = 1, returnExit = 0) key = 0 for mouse in mice: @@ -931,34 +931,8 @@ class LiloImagesWindow: return "%-10s %-25s %-7s %-10s" % ( "/dev/" + device, type, default, label) def __call__(self, screen, todo): - drives = todo.drives.available ().keys () - images = {} - for drive in drives: - try: - table = _balkan.readTable ('/tmp/' + drive) - except SystemError: - pass - else: - for i in range (len (table)): - (type, sector, size) = table[i] - if size and (type == 1 or type == 2): - dev = drive + str (i + 1) - images[dev] = ("", type) - - if (not images): return - - mountsByDev = {} - for loc in todo.mounts.keys(): - (device, fsystem, reformat) = todo.mounts[loc] - mountsByDev[device] = loc - - for dev in images.keys(): - if (mountsByDev.has_key(dev)): - if mountsByDev[dev] == '/': - default = dev - images[dev] = ("linux", 2) - else: - del images[dev] + images = todo.liloImages + if not images: return sortedKeys = images.keys() sortedKeys.sort() @@ -1225,6 +1199,36 @@ class WaitWindow: g.draw() self.screen.refresh() +class TimezoneWindow: + + def getTimezoneList(self, test): + if test: + cmd = "./gettzlist" + stdin = None + else: + cmd = "/usr/bin/gunzip" + stdin = os.open("/usr/lib/timezones.gz", 0) + + zones = iutil.execWithCapture(cmd, [ cmd ], stdin = stdin) + zoneList = string.split(zones) + + if (stdin != None): os.close(stdin) + + return zoneList + + def __call__(self, screen, todo, test): + timezones = self.getTimezoneList(test) + (button, choice) = \ + ListboxChoiceWindow(screen, _("Time zone Selection"), + _("What time zone are you located in?"), + timezones, buttons = [(_("OK"), "ok"), + (_("Back"), "back")], width = 40, height = 8, + default = "US/Eastern") + + if (button == "back"): + return INSTALL_BACK + + return INSTALL_OK class Flag: """a quick mutable boolean class""" @@ -1272,7 +1276,7 @@ class InstallInterface: def __del__(self): self.screen.finish() - def run(self, todo): + def run(self, todo, test = 0): self.commonSteps = [ [_("Language Selection"), LanguageWindow, (self.screen, todo)], [_("Keyboard Selection"), KeyboardWindow, (self.screen, todo)], @@ -1282,6 +1286,7 @@ class InstallInterface: self.installSteps = [ [_("Network Setup"), NetworkWindow, (self.screen, todo)], + [_("Time zone Setup"), TimezoneWindow, (self.screen, todo, test)], [_("Hostname Setup"), HostnameWindow, (self.screen, todo)], [_("Partition"), PartitionWindow, (self.screen, todo)], [_("Filesystem Formatting"), FormatWindow, (self.screen, todo)], @@ -295,7 +295,8 @@ class ToDo: self.upgrade = 0 self.lilo = LiloConfiguration() self.initrdsMade = {} - + self.liloImages = {} + def umountFilesystems(self): if (not self.setupFilesystems): return @@ -311,6 +312,42 @@ class ToDo: # XXX pass + def getLiloImages(self): + if self.liloImages: + return self.liloImages + + drives = self.drives.available ().keys () + images = {} + for drive in drives: + try: + table = _balkan.readTable ('/tmp/' + drive) + except SystemError: + pass + else: + for i in range (len (table)): + (type, sector, size) = table[i] + if size and (type == 1 or type == 2): + dev = drive + str (i + 1) + images[dev] = ("", type) + + if (not images): return None + + mountsByDev = {} + for loc in self.mounts.keys(): + (device, fsystem, reformat) = self.mounts[loc] + mountsByDev[device] = loc + + for dev in images.keys(): + if (mountsByDev.has_key(dev)): + if mountsByDev[dev] == '/': + default = dev + images[dev] = ("linux", 2) + else: + del images[dev] + + self.liloImages = images + return self.liloImages + def mountFilesystems(self): if (not self.setupFilesystems): return |