include overrides for zfs-import.target

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Vince van Oosten <techhazard@codeforyouand.me>
Closes #14075
Closes #14076
This commit is contained in:
Vince van Oosten 2022-10-23 11:11:18 +02:00 committed by Brian Behlendorf
parent b10f73f78e
commit 59ca6e2ad0

View File

@ -81,15 +81,24 @@ install() {
inst_simple "${moddir}/zfs-env-bootfs.service" "${systemdsystemunitdir}/zfs-env-bootfs.service"
systemctl -q --root "${initdir}" add-wants zfs-import.target zfs-env-bootfs.service
# Add user-provided unit overrides:
# - /etc/systemd/system/${_service}
# - /etc/systemd/system/${_service}.d/overrides.conf
# -H ensures they are marked host-only
# -o ensures there is no error upon absence of these files
inst_multiple -o -H \
"${systemdsystemconfdir}/zfs-import.target" \
"${systemdsystemconfdir}/zfs-import.target.d/"*.conf
for _service in \
"zfs-import-scan.service" \
"zfs-import-cache.service"; do
inst_simple "${systemdsystemunitdir}/${_service}"
systemctl -q --root "${initdir}" add-wants zfs-import.target "${_service}"
# Add user-provided unit overrides
# - /etc/systemd/system/zfs-import-{scan,cache}.service
# - /etc/systemd/system/zfs-import-{scan,cache}.service.d/overrides.conf
# Add user-provided unit overrides:
# - /etc/systemd/system/${_service}
# - /etc/systemd/system/${_service}.d/overrides.conf
# -H ensures they are marked host-only
# -o ensures there is no error upon absence of these files
inst_multiple -o -H \