aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in
diff options
context:
space:
mode:
Diffstat (limited to 'sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in')
-rw-r--r--sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in26
1 files changed, 26 insertions, 0 deletions
diff --git a/sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in b/sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in
new file mode 100644
index 000000000000..0698fad12074
--- /dev/null
+++ b/sys/contrib/openzfs/etc/systemd/system/zfs-mount@.service.in
@@ -0,0 +1,26 @@
+[Unit]
+Description=Mount ZFS filesystem %I
+Documentation=man:zfs(8)
+DefaultDependencies=no
+After=systemd-udev-settle.service
+After=zfs-import.target
+After=zfs-mount.service
+After=systemd-remount-fs.service
+Before=local-fs.target
+ConditionPathIsDirectory=/sys/module/zfs
+
+# This merely tells the service manager
+# that unmounting everything undoes the
+# effect of this service. No extra logic
+# is ran as a result of these settings.
+Conflicts=umount.target
+Before=umount.target
+
+[Service]
+Type=oneshot
+RemainAfterExit=yes
+EnvironmentFile=-@initconfdir@/zfs
+ExecStart=@sbindir@/zfs mount -R %I
+
+[Install]
+WantedBy=zfs.target