diff options
author | James Meyer <james.meyer@operamail.com> | 2011-12-07 19:24:52 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2011-12-07 19:24:52 (GMT) |
commit | a46272923e52e3d31c92eba3de97391219857a7d (patch) | |
tree | e17282a3ed7b201f25158579e19008b2db820d7d /abs/core/certmaster/acl_fix_fstab.py | |
parent | 8ae1bab112c9567ce4bbe26dee820a6dfe29daf2 (diff) | |
download | linhes_pkgbuild-a46272923e52e3d31c92eba3de97391219857a7d.zip linhes_pkgbuild-a46272923e52e3d31c92eba3de97391219857a7d.tar.gz linhes_pkgbuild-a46272923e52e3d31c92eba3de97391219857a7d.tar.bz2 |
certmaster: first build
Needed with for func.
This should only run on the MBE
Diffstat (limited to 'abs/core/certmaster/acl_fix_fstab.py')
-rw-r--r-- | abs/core/certmaster/acl_fix_fstab.py | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/abs/core/certmaster/acl_fix_fstab.py b/abs/core/certmaster/acl_fix_fstab.py new file mode 100644 index 0000000..8e49a15 --- /dev/null +++ b/abs/core/certmaster/acl_fix_fstab.py @@ -0,0 +1,39 @@ +#!/usr/bin/python2 +import os +import sys +cmd="cp -f /etc/fstab /etc/fstab.backup.pre_acl" +os.system(cmd) +f = open('/etc/fstab', 'r') +fstab=f.readlines() +f.close() + + + + +mp=['/' , '/myth', '/data'] +newfstab=[] +for line in fstab: + new_line=line + split_line=line.split() + try: + if split_line[1] in mp: + #print split_line[3] + if "acl" in split_line[3]: + pass + else: + print "Adding ACL" + new_acl=split_line[3]+",acl" + split_line[3]=new_acl + new_line='\t'.join(split_line) + except: + pass + newfstab.append(new_line) + + +f = open('/etc/fstab', 'w') +for i in newfstab: + f.write(i) + f.write("\n") + +f.close() + |