]> git.proxmox.com Git - mirror_zfs.git/blobdiff - etc/systemd/system-generators/zfs-mount-generator.in
zfs-mount-generator: Fix escaping for /
[mirror_zfs.git] / etc / systemd / system-generators / zfs-mount-generator.in
index 066896009e94805db978540d3593e8b08343b362..b79ce5482e598f3191e3a298dc185045cbba7f23 100755 (executable)
@@ -156,7 +156,7 @@ ExecStop=@sbindir@/zfs unload-key '${dataset}'"   > "${dest_norm}/${keyloadunit}
   fi
 
   # Escape the mountpoint per systemd policy.
-  mountfile="$(systemd-escape "${p_mountpoint#?}").mount"
+  mountfile="$(systemd-escape --path --suffix=mount "${p_mountpoint}")"
 
   # Parse options
   # see lib/libzfs/libzfs_mount.c:zfs_add_options