From 8e12ad0f8a43ff5cf44a683e05baca1b2331dbd1 Mon Sep 17 00:00:00 2001 From: MaDYeTTi Date: Tue, 14 Mar 2017 19:40:23 +0000 Subject: [PATCH] regexp in mountpoint Currently there is no possibility to use /- in mount_entries that will allow fot all paths staring from "/" and ending "/" to be servicesd by "/-" entry in auto/master --- manifests/mount.pp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/manifests/mount.pp b/manifests/mount.pp index 43ba051..d5b0a6f 100644 --- a/manifests/mount.pp +++ b/manifests/mount.pp @@ -12,7 +12,8 @@ fail("Autofs::Mount options string must start with -, and not contain spaces. Got: ${options}") } - if dirname($mountpoint) == '/' { + if $mountpoint =~ /^[\/]([[0-9a-zA-Z\.\/_\s-]]*)*[\/]$/ { + $dirname = '/-' $basename = $mountpoint } else {