bundles/nfs-client: minor fixes

This commit is contained in:
Franzi 2022-04-27 05:39:34 +02:00
parent 74b3a513f6
commit a38b66a7c5
Signed by: kunsi
GPG Key ID: 12E3D2136B818350
1 changed files with 10 additions and 7 deletions

View File

@ -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),