projects
/
mirror
/
userdir-ldap.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use eatmydata!
[mirror/userdir-ldap.git]
/
ud-generate
diff --git
a/ud-generate
b/ud-generate
index
0826215
..
badef2f
100755
(executable)
--- a/
ud-generate
+++ b/
ud-generate
@@
-361,9
+361,6
@@
def GenSSHShadow(global_dir, accounts):
# Fetch all the users
userkeys = {}
# Fetch all the users
userkeys = {}
- safe_rmtree(os.path.join(global_dir, 'userkeys'))
- safe_makedirs(os.path.join(global_dir, 'userkeys'))
-
for a in accounts:
if not 'sshRSAAuthKey' in a: continue
for a in accounts:
if not 'sshRSAAuthKey' in a: continue
@@
-573,7
+570,9
@@
def GenCDB(accounts, File, key):
Fdb = None
try:
OldMask = os.umask(0022)
Fdb = None
try:
OldMask = os.umask(0022)
- Fdb = os.popen("cdbmake %s %s.tmp"%(File, File), "w")
+ # nothing else does the fsync stuff, so why do it here?
+ prefix = "/usr/bin/eatmydata " if os.path.exists('/usr/bin/eatmydata') else ''
+ Fdb = os.popen("%scdbmake %s %s.tmp"%(prefix, File, File), "w")
os.umask(OldMask)
# Write out the email address for each user
os.umask(OldMask)
# Write out the email address for each user