bundles/nfs-client: minor fixes
This commit is contained in:
parent
74b3a513f6
commit
a38b66a7c5
1 changed files with 10 additions and 7 deletions
|
@ -10,15 +10,11 @@ for mount, data in node.metadata.get('nfs-client/mounts',{}).items():
|
|||
unitname = data.get('mountpoint','')[1:].replace('-','\\x2d').replace('/','-')
|
||||
|
||||
directories[data['mountpoint']] = {
|
||||
'owner': None,
|
||||
'group': None,
|
||||
'mode': None,
|
||||
'owner': data.get('owner'),
|
||||
'group': data.get('group'),
|
||||
'mode': data.get('mode'),
|
||||
}
|
||||
|
||||
for parameter in ['mode', 'owner', 'group']:
|
||||
if parameter in data:
|
||||
directories[data['mountpoint']][parameter] = data[parameter]
|
||||
|
||||
if 'suid' not in data['mount_options']:
|
||||
data['mount_options'].add('nosuid')
|
||||
|
||||
|
@ -49,6 +45,13 @@ for mount, data in node.metadata.get('nfs-client/mounts',{}).items():
|
|||
},
|
||||
}
|
||||
else:
|
||||
files['/etc/systemd/system/{}.automount'.format(unitname)] = {
|
||||
'delete': True,
|
||||
'triggers': {
|
||||
"action:systemd-reload",
|
||||
},
|
||||
}
|
||||
|
||||
svc_systemd['{}.mount'.format(unitname)] = {
|
||||
'needs': {
|
||||
'file:/etc/systemd/system/{}.mount'.format(unitname),
|
||||
|
|
Loading…
Reference in a new issue