Skip to content
This repository has been archived by the owner on Mar 8, 2023. It is now read-only.

Commit

Permalink
More flexible nfsv4 export naming.
Browse files Browse the repository at this point in the history
When exporting a directory using nfsv4, if your directory name had a trailing slash the export would fail in a difficult to understand manner. I've updated the nfsv4 export name regex to be more friendly about trailing slashes, which eliminates the problem.
  • Loading branch information
pflarr committed Jun 2, 2015
1 parent a828120 commit 8c12314
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion manifests/server/export.pp
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
define nfs::server::export (
$v3_export_name = $name,
$v4_export_name = regsubst($name, '.*/(.*)', '\1' ),
# Grab the final directory name in the given path and make it our default nfsv4 export name.
$v4_export_name = regsubst($name, '.*/([^/]+)/?$', '\1' ),
$clients = 'localhost(ro)',
$bind = 'rbind',
# globals for this share
Expand Down

0 comments on commit 8c12314

Please sign in to comment.