From d7fbbc426c6887bec7d00b312ab1b84f4850ebe1 Mon Sep 17 00:00:00 2001 From: Colin Walters Date: Mon, 18 May 2020 17:14:09 +0000 Subject: [PATCH] overlay: Don't mount /boot/efi on AWS Preparation for potentially removing the ESP from AWS images, because AWS `ImportImage` chokes on its presence: https://github.com/openshift/os/pull/396 --- .../coreos-boot-mount-generator | 24 ++++++++++++------- 1 file changed, 15 insertions(+), 9 deletions(-) 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}" <