diff --git a/bundles/nfs-client/files/nfs.automount b/bundles/nfs-client/files/nfs.automount index 4854213..c0e2cda 100644 --- a/bundles/nfs-client/files/nfs.automount +++ b/bundles/nfs-client/files/nfs.automount @@ -3,7 +3,7 @@ Description=Automount ${mount} on access [Automount] Where=${mountpoint} -TimeoutIdleSec=5min +TimeoutIdleSec=30 [Install] WantedBy=local-fs.target diff --git a/bundles/nfs-client/files/nfs.mount b/bundles/nfs-client/files/nfs.mount index da4823a..e11f4c0 100644 --- a/bundles/nfs-client/files/nfs.mount +++ b/bundles/nfs-client/files/nfs.mount @@ -9,6 +9,8 @@ What=${serverpath} Where=${mountpoint} Type=nfs Options=${','.join(sorted(mount_options))} +ForceUnmount=yes +TimeoutSec=10 [Install] WantedBy=multi-user.target diff --git a/bundles/nfs-client/items.py b/bundles/nfs-client/items.py index b2d072a..f800922 100644 --- a/bundles/nfs-client/items.py +++ b/bundles/nfs-client/items.py @@ -19,6 +19,12 @@ for mount, data in node.metadata.get('nfs-client/mounts',{}).items(): if parameter in data: directories[data['mountpoint']][parameter] = data[parameter] + if 'suid' not in data['mount_options']: + data['mount_options'].add('nosuid') + + if 'hard' not in data['mount_options']: + data['mount_options'].add('soft') + if data.get('automount', True): data['mount_options'].add('x-systemd.automount')