summaryrefslogtreecommitdiffstats
path: root/iutil.py
diff options
context:
space:
mode:
authorMatt Wilson <msw@redhat.com>2000-04-17 20:00:33 +0000
committerMatt Wilson <msw@redhat.com>2000-04-17 20:00:33 +0000
commit6f122a2794396f1777e3fe41bc98fda27e67ae44 (patch)
tree3074b305703c1f0170673657ae0e5834a1085f5a /iutil.py
parent96040f2d2acfcc3052eefd2102227aabbaf70f6f (diff)
downloadanaconda-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.py39
1 files changed, 39 insertions, 0 deletions
diff --git a/iutil.py b/iutil.py
index 7c7335ada..b64edbc59 100644
--- a/iutil.py
+++ b/iutil.py
@@ -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"
+