diff options
Diffstat (limited to 'abs/core/LinHES-config/mv_fileshare.py')
-rwxr-xr-x | abs/core/LinHES-config/mv_fileshare.py | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/abs/core/LinHES-config/mv_fileshare.py b/abs/core/LinHES-config/mv_fileshare.py index 58c11d8..5844a2f 100755 --- a/abs/core/LinHES-config/mv_fileshare.py +++ b/abs/core/LinHES-config/mv_fileshare.py @@ -327,7 +327,6 @@ def setup_etc_exports(shares,data_config,servername,nfslist): templine = "%s %s" %(sharename,mountpoint) nfs_map_auto.append(templine) - #create the lists for both /etc/exports and nfs_map_auto for share in shares: if share == "/myth": @@ -354,6 +353,22 @@ def setup_etc_exports(shares,data_config,servername,nfslist): templine = nfs_auto_line %(servername,tempname,tempname) nfs_map_auto.append(templine) + #read in users templates/nfs.shares + logging.debug(" processing nfs.shares file") + nfsshares_file=data_config.MYTHHOME+"/templates/nfs.shares" + try: + f = open(nfsshares_file,"r") + for line in f.read().splitlines(): + if line.startswith("#"): + continue + item = line.split() + if len(line) <= 1 : + continue + logging.debug(" %s",line) + share_list.append(line) + except : + logging.critical(" Couldn't read %s",nfsshares_file) + new_exports=[] new_exports.append("#This file was generated by systemconfig.py -m fileshare") new_exports.append("#Use exportfs -arv to reread. \n\n") |