summaryrefslogtreecommitdiffstats
path: root/contrib
diff options
context:
space:
mode:
Diffstat (limited to 'contrib')
-rwxr-xr-xcontrib/dracut/90zfs/module-setup.sh.in15
1 files changed, 12 insertions, 3 deletions
diff --git a/contrib/dracut/90zfs/module-setup.sh.in b/contrib/dracut/90zfs/module-setup.sh.in
index b16529de9..6be718587 100755
--- a/contrib/dracut/90zfs/module-setup.sh.in
+++ b/contrib/dracut/90zfs/module-setup.sh.in
@@ -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 \