diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-09 19:38:34 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2022-02-09 19:43:41 +0100 |
commit | e78e922b1ec0b5cda507351d0c6408b84293b78b (patch) | |
tree | e18a3db0ee6a234988a4c01ece7a1340106010b3 | |
parent | Systemd_mount where = $name (diff) | |
download | systemd_mount-e78e922b1ec0b5cda507351d0c6408b84293b78b.tar.gz systemd_mount-e78e922b1ec0b5cda507351d0c6408b84293b78b.tar.xz |
Change path escape rules.
-rw-r--r-- | manifests/init.pp | 8 |
1 files changed, 7 insertions, 1 deletions
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 { |