From fdc59cf56356858c00b9f06fd9fe11ab60ad7790 Mon Sep 17 00:00:00 2001 From: Vince van Oosten Date: Sun, 23 Oct 2022 11:11:58 +0200 Subject: [PATCH] include overrides for zfs snapshot/rollback bootfs.service Reviewed-by: Brian Behlendorf Signed-off-by: Vince van Oosten Closes #14075 Closes #14076 --- contrib/dracut/90zfs/module-setup.sh.in | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in index 6be718587..528abe429 100755 --- a/contrib/dracut/90zfs/module-setup.sh.in +++ b/contrib/dracut/90zfs/module-setup.sh.in @@ -112,6 +112,15 @@ install() { "zfs-rollback-bootfs.service"; do inst_simple "${moddir}/${_service}" "${systemdsystemunitdir}/${_service}" systemctl -q --root "${initdir}" add-wants initrd.target "${_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}/${_service}" \ + "${systemdsystemconfdir}/${_service}.d/"*.conf done inst_simple "${moddir}/import-opts-generator.sh" "${systemdutildir}/system-environment-generators/zfs-import-opts.sh"