summaryrefslogtreecommitdiffstats
path: root/src/lib/Server/Generators/Account.py
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/Server/Generators/Account.py')
-rw-r--r--src/lib/Server/Generators/Account.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/lib/Server/Generators/Account.py b/src/lib/Server/Generators/Account.py
index afbefd29c..8b1facbac 100644
--- a/src/lib/Server/Generators/Account.py
+++ b/src/lib/Server/Generators/Account.py
@@ -1,7 +1,7 @@
'''This handles authentication setup'''
__revision__ = '$Revision$'
-from Bcfg2.Server.Generator import Generator, DirectoryBacked
+from Bcfg2.Server.Generator import Generator, GeneratorInitError, DirectoryBacked
class Account(Generator):
'''This module generates account config files,
@@ -19,8 +19,12 @@ class Account(Generator):
def __init__(self, core, datastore):
Generator.__init__(self, core, datastore)
- self.repository = DirectoryBacked(self.data)
- self.ssh = DirectoryBacked("%s/ssh"%(self.data))
+ try:
+ self.repository = DirectoryBacked(self.data, self.core.fam)
+ self.ssh = DirectoryBacked("%s/ssh"%(self.data), self.core.fam)
+ except:
+ self.LogError("Failed to load repos: %s, %s" % (self.data, "%s/ssh" % (self.data)))
+ raise GeneratorInitError
self.__provides__['ConfigFile'] = {'/etc/passwd':self.from_yp,
'/etc/group':self.from_yp,
'/etc/security/limits.conf':self.gen_limits,