[Unit]
Description=Mount a partition identified by label boot to /boot

# Ensure this runs before the handoff to the real root, if that's required:
Before=sel-ebc-pvebc.service

# Initramfs requirement
DefaultDependencies=no
# Make absolutely sure this only runs in initramfs
ConditionPathExists=/etc/initrd-release
ConditionKernelCommandLine=rd.sel-ebc
Requires=systemd-udev-settle.service
After=systemd-udev-settle.service
After=systemd-udevd.service

[Service]
Type=oneshot
ExecStart=/bin/bash /etc/sel-ebc/boot-mount.sh
RemainAfterExit=yes
ExecStop=/usr/bin/umount /boot
# On failure immediately abort boot
FailureAction=poweroff-immediate

[Install]
RequiredBy=sel-ebc-pvebc.service
