summaryrefslogtreecommitdiffstats
path: root/ipalib/config.py
diff options
context:
space:
mode:
authorJason Gerard DeRose <jderose@redhat.com>2009-01-30 20:53:32 -0700
committerRob Crittenden <rcritten@redhat.com>2009-02-03 15:29:05 -0500
commitc2b0c801400fcb59be8687f9faf061aa85bcffd2 (patch)
tree434634987f8888ad5b0b66db78627f9e37206c84 /ipalib/config.py
parent91ca06f079f4de1ca5e6c60cfdf7aae75f60821b (diff)
downloadfreeipa-c2b0c801400fcb59be8687f9faf061aa85bcffd2.tar.gz
freeipa-c2b0c801400fcb59be8687f9faf061aa85bcffd2.tar.xz
freeipa-c2b0c801400fcb59be8687f9faf061aa85bcffd2.zip
Started work on a much simplified mod_python server
Diffstat (limited to 'ipalib/config.py')
-rw-r--r--ipalib/config.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/ipalib/config.py b/ipalib/config.py
index 735cf0a1f..42d7ab578 100644
--- a/ipalib/config.py
+++ b/ipalib/config.py
@@ -432,8 +432,9 @@ class Env(object):
self.site_packages = path.dirname(self.ipalib)
self.script = path.abspath(sys.argv[0])
self.bin = path.dirname(self.script)
- self.home = path.abspath(os.environ['HOME'])
- self.dot_ipa = path.join(self.home, '.ipa')
+ self.home = os.environ.get('HOME', None)
+ self.etc = path.join('/', 'etc', 'ipa')
+ self.dot_ipa = self._join('home', '.ipa')
self._merge(**overrides)
if 'in_tree' not in self:
if self.bin == self.site_packages and \
@@ -454,6 +455,10 @@ class Env(object):
if 'conf_dir' not in self:
self.conf_dir = base
+ def _join(self, key, *parts):
+ if key in self and self[key] is not None:
+ return path.join(self[key], *parts)
+
def _finalize_core(self, **defaults):
"""
Complete initialization of standard IPA environment.