Commit 5ffbbf1a authored by Ken Manheimer's avatar Ken Manheimer

Incorporate the directory-hierarchy permissions setting activity, to

be done only when the Data.fs is being created.  (This activity came
from the separate, short-lived module, default_perms.)
parent 2e14f7d1
...@@ -92,6 +92,11 @@ def main(home, user='', group=''): ...@@ -92,6 +92,11 @@ def main(home, user='', group=''):
db_path=os.path.join(data_dir, 'Data.fs') db_path=os.path.join(data_dir, 'Data.fs')
dd_path=os.path.join(data_dir, 'Data.fs.in') dd_path=os.path.join(data_dir, 'Data.fs.in')
if not os.path.exists(db_path) and os.path.exists(dd_path): if not os.path.exists(db_path) and os.path.exists(dd_path):
print '-'*78
print 'setting dir permissions'
def dir_chmod(mode, dir, files, user=user, group=group):
ch(dir, user=user, group=group, mode=mode)
os.path.walk(home, dir_chmod, mode)
print '-'*78 print '-'*78
print 'creating default database' print 'creating default database'
open(db_path,'wb').write(open(dd_path,'rb').read()) open(db_path,'wb').write(open(dd_path,'rb').read())
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment