Skip to content

Commit

Permalink
zfs-mount-generator: Fix escaping for /
Browse files Browse the repository at this point in the history
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
  • Loading branch information
rlaager authored and tonyhutter committed May 12, 2020
1 parent d4e04cc commit ebc8e36
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion etc/systemd/system-generators/zfs-mount-generator.in
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ebc8e36

Please sign in to comment.