]> git.proxmox.com Git - mirror_zfs.git/commitdiff
include overrides for zfs snapshot/rollback bootfs.service
authorVince van Oosten <techhazard@codeforyouand.me>
Sun, 23 Oct 2022 09:11:58 +0000 (11:11 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Tue, 1 Nov 2022 19:23:58 +0000 (12:23 -0700)
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Vince van Oosten <techhazard@codeforyouand.me>
Closes #14075
Closes #14076

contrib/dracut/90zfs/module-setup.sh.in

index 6be718587411e95c3c0b0fa005497f99e1cfa2f9..528abe42957ba1759aa012cdd3720f37387cf929 100755 (executable)
@@ -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"