summaryrefslogtreecommitdiffstats
path: root/etc
diff options
context:
space:
mode:
authorRichard Laager <[email protected]>2020-02-13 13:55:59 -0600
committerGitHub <[email protected]>2020-02-13 11:55:59 -0800
commitd1d65bb367d7baa4de1ae50640cf55b6434ee4a2 (patch)
tree437ba1968fe5d49417e30ec6b91f99b317ffef69 /etc
parentf49b7a0d8ec2579c1f06c8ea7581448927482fb2 (diff)
zfs-mount-generator: Fix escaping for /
The correct name for the mount unit for / is "-.mount", not ".mount". Reviewed-by: InsanePrawn <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Co-authored-by: Antonio Russo <[email protected]> Signed-off-by: Richard Laager <[email protected]> Closes #9970
Diffstat (limited to 'etc')
-rwxr-xr-xetc/systemd/system-generators/zfs-mount-generator.in2
1 files changed, 1 insertions, 1 deletions
diff --git a/etc/systemd/system-generators/zfs-mount-generator.in b/etc/systemd/system-generators/zfs-mount-generator.in
index 066896009..b79ce5482 100755
--- a/etc/systemd/system-generators/zfs-mount-generator.in
+++ b/etc/systemd/system-generators/zfs-mount-generator.in
@@ -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