diff --git a/overlay.d/05core/usr/lib/systemd/system-generators/coreos-boot-mount-generator b/overlay.d/05core/usr/lib/systemd/system-generators/coreos-boot-mount-generator index c85f0a2d77..70a29ea037 100755 --- a/overlay.d/05core/usr/lib/systemd/system-generators/coreos-boot-mount-generator +++ b/overlay.d/05core/usr/lib/systemd/system-generators/coreos-boot-mount-generator @@ -33,10 +33,11 @@ fi # device that systemd will fsck. This code ensures that if the label # is backed by a device-mapper target the dev-mapper.*.device is used. mk_mount() { - local unit_name="${1}.mount"; shift + local mount_pt=${1}; shift local label="${1}"; shift - local mount_pt="${1:-/$label}" + local conditions="${1:-}" local path="/dev/disk/by-label/${label}" + local unit_name=$(systemd-escape -p ${mount_pt} --suffix=mount) eval $(udevadm info --query property --export "${path}") device="$(systemd-escape ${path})" @@ -45,21 +46,22 @@ mk_mount() { device="$(systemd-escape dev/mapper/${DM_NAME})" fi device="${device//-dev/dev}" - echo "coreos-boot-mount-generator: using ${device} for ${label} mount to ${mount_pt}" + echo "coreos-boot-mount-generator: using ${device} for ${label} mount ${unit_name}" cat > "${UNIT_DIR}/${unit_name}" <