From e78e922b1ec0b5cda507351d0c6408b84293b78b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Wed, 9 Feb 2022 19:38:34 +0100 Subject: Change path escape rules. --- manifests/init.pp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/manifests/init.pp b/manifests/init.pp index 7938555..b7eef59 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -5,7 +5,13 @@ define systemd_mount ( String $wantedBy = 'default.target', ) { - $mostly_fixed = regsubst($where, '/', '-', 'G') + $mostly_fixed = $where.map |$c| { + $c ? { + '/' => '-', + '-' => '\\x2d', + default => $c, + } + }.join('') $fixed = if $mostly_fixed[0] == '-' { $mostly_fixed[1, -1] # drop first char } else { -- cgit v1.2.3