X-Git-Url: https://git.adam-barratt.org.uk/?a=blobdiff_plain;f=ud-generate;h=badef2f694a3618ae8ca4c6f3ab4b0e8fd11f3e8;hb=cfa612e5b2ea0d9938e4e8779628ac6a84edc711;hp=082621555ab2ae0c2176a81ca60e68bac4305bc0;hpb=a01d6fec840dba0e2539dde04b96f85472f5cec5;p=mirror%2Fuserdir-ldap.git diff --git a/ud-generate b/ud-generate index 0826215..badef2f 100755 --- a/ud-generate +++ b/ud-generate @@ -361,9 +361,6 @@ def GenSSHShadow(global_dir, accounts): # 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 @@ -573,7 +570,9 @@ def GenCDB(accounts, File, key): 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