diff options
author | Matt Wilson <msw@redhat.com> | 2000-04-17 20:00:33 +0000 |
---|---|---|
committer | Matt Wilson <msw@redhat.com> | 2000-04-17 20:00:33 +0000 |
commit | 6f122a2794396f1777e3fe41bc98fda27e67ae44 (patch) | |
tree | 3074b305703c1f0170673657ae0e5834a1085f5a /iutil.py | |
parent | 96040f2d2acfcc3052eefd2102227aabbaf70f6f (diff) | |
download | anaconda-6f122a2794396f1777e3fe41bc98fda27e67ae44.tar.gz anaconda-6f122a2794396f1777e3fe41bc98fda27e67ae44.tar.xz anaconda-6f122a2794396f1777e3fe41bc98fda27e67ae44.zip |
merge from anaconda-6-2j-branch
Diffstat (limited to 'iutil.py')
-rw-r--r-- | iutil.py | 39 |
1 files changed, 39 insertions, 0 deletions
@@ -291,3 +291,42 @@ esac execWithRedirect('/bin/sh', args, stdin = None, stdout = None, stderr = None, root = root) + +def defaultZone(): + if os.access("lang-table", os.R_OK): + f = open("lang-table", "r") + elif os.access("/etc/lang-table", os.R_OK): + f = open("/etc/lang-table", "r") + else: + f = open("/usr/lib/anaconda/lang-table", "r") + + lines = f.readlines () + f.close() + + for line in lines: + string.strip(line) + l = string.split(line) + if l[4] == os.environ["LANG"]: + return l[6] + + return "America/New_York" + +def defaultKeyboard(): + if os.access("lang-table", os.R_OK): + f = open("lang-table", "r") + elif os.access("/etc/lang-table", os.R_OK): + f = open("/etc/lang-table", "r") + else: + f = open("/usr/lib/anaconda/lang-table", "r") + + lines = f.readlines () + f.close() + + for line in lines: + string.strip(line) + l = string.split(line) + if l[4] == os.environ["LANG"]: + return l[5] + + return "us" + |