diff options
author | James Meyer <james.meyer@operamail.com> | 2012-01-02 21:32:55 (GMT) |
---|---|---|
committer | James Meyer <james.meyer@operamail.com> | 2012-01-02 21:32:55 (GMT) |
commit | b35e8f78a35eb49404b988562daec8d4ec2712e6 (patch) | |
tree | 48f795669bea45616a94925894e734a69740bfd7 /abs/core/certmaster/acl_fix_fstab.py | |
parent | 7e3fef96a2905ffc5afc2bcaf31c5d8384a10ad3 (diff) | |
download | linhes_pkgbuild-b35e8f78a35eb49404b988562daec8d4ec2712e6.zip linhes_pkgbuild-b35e8f78a35eb49404b988562daec8d4ec2712e6.tar.gz linhes_pkgbuild-b35e8f78a35eb49404b988562daec8d4ec2712e6.tar.bz2 |
move acl_fix_fstab.py to linhes-scripts:
modify packages to depend on linhes-scripts >=7-24
certmaster
linhes-system
wmaker-settings
xymon
e16-themes
refs #805
res #806
Diffstat (limited to 'abs/core/certmaster/acl_fix_fstab.py')
-rw-r--r-- | abs/core/certmaster/acl_fix_fstab.py | 64 |
1 files changed, 0 insertions, 64 deletions
diff --git a/abs/core/certmaster/acl_fix_fstab.py b/abs/core/certmaster/acl_fix_fstab.py deleted file mode 100644 index 187cab1..0000000 --- a/abs/core/certmaster/acl_fix_fstab.py +++ /dev/null @@ -1,64 +0,0 @@ -#!/usr/bin/python2 -import os -import sys -import subprocess as sub - -def should_add_acl(mount_point,fs_map): - acl_fs_list=["ext3","ext4"] - rc = False - for i in fs_map: - if i[0] == mount_point: - if i[1] in acl_fs_list: - rc = True - - return rc - - -cmd="cp -f /etc/fstab /etc/fstab.backup.pre_acl" -os.system(cmd) -f = open('/etc/fstab', 'r') -fstab=f.readlines() -f.close() - -p = sub.Popen(['/sbin/fsck','-N' ],stdout=sub.PIPE,stderr=sub.PIPE) -output, errors = p.communicate() -output = output.split("\n") -fs_map=[] -for i in output: - if i.startswith("["): - split_line=i.split() - #find mount_p and remove the last char - mount_p = split_line[3][:-1] - fstype = split_line[4].split(".")[1] - append_tuple=(mount_p,fstype) - fs_map.append(append_tuple) - - - -mp=['/' , '/myth', '/data'] -newfstab=[] -for line in fstab: - new_line=line - split_line=line.split() - try: - if split_line[1] in mp and should_add_acl(split_line[1],fs_map): - #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() - |