From 5566c1cc0bc8d62df8a8aac420293c5c9e077fb8 Mon Sep 17 00:00:00 2001 From: Grischa Zengel Date: Fri, 25 Sep 2015 19:10:10 +0200 Subject: [PATCH 1/6] Update zfs-import-cache.service.in --- etc/systemd/system/zfs-import-cache.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index b1deb6ed9630..27870946fa1d 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -5,6 +5,7 @@ Requires=systemd-udev-settle.service After=systemd-udev-settle.service After=cryptsetup.target ConditionPathExists=@sysconfdir@/zfs/zpool.cache +Conflicts=zfs-import.service [Service] Type=oneshot From 54d0d096fded9c88dc31b797a631b32c9d900852 Mon Sep 17 00:00:00 2001 From: Grischa Zengel Date: Fri, 25 Sep 2015 19:10:36 +0200 Subject: [PATCH 2/6] Update zfs-import-scan.service.in --- etc/systemd/system/zfs-import-scan.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index 517e12e3a26e..bcf439ba17e6 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -5,6 +5,7 @@ Requires=systemd-udev-settle.service After=systemd-udev-settle.service After=cryptsetup.target ConditionPathExists=!@sysconfdir@/zfs/zpool.cache +Conflicts=zfs-import.service [Service] Type=oneshot From c417817dbc62bc5aad947e5195482f8d8a887fbf Mon Sep 17 00:00:00 2001 From: Grischa Zengel Date: Fri, 25 Sep 2015 19:26:34 +0200 Subject: [PATCH 3/6] Update zfs-mount.service.in --- etc/systemd/system/zfs-mount.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/systemd/system/zfs-mount.service.in b/etc/systemd/system/zfs-mount.service.in index f1056af311cd..99c84b503fb7 100644 --- a/etc/systemd/system/zfs-mount.service.in +++ b/etc/systemd/system/zfs-mount.service.in @@ -13,3 +13,4 @@ Before=local-fs.target Type=oneshot RemainAfterExit=yes ExecStart=@sbindir@/zfs mount -a +ExecStop=@sbindir@/zfs unmount -a From ee8cc2b265f96ea45a732a8275e24e57ac94c7b8 Mon Sep 17 00:00:00 2001 From: Grischa Zengel Date: Fri, 25 Sep 2015 19:27:25 +0200 Subject: [PATCH 4/6] Update zfs-share.service.in --- etc/systemd/system/zfs-share.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/systemd/system/zfs-share.service.in b/etc/systemd/system/zfs-share.service.in index c27bbf903ecb..dc3164d2f8dc 100644 --- a/etc/systemd/system/zfs-share.service.in +++ b/etc/systemd/system/zfs-share.service.in @@ -12,3 +12,4 @@ Type=oneshot RemainAfterExit=yes ExecStartPre=-@bindir@/rm /etc/dfs/sharetab ExecStart=@sbindir@/zfs share -a +ExecStop=@sbindir@/zfs unshare -a From 84917431fdb8976c71a16ca2251e1c3f44fa7c21 Mon Sep 17 00:00:00 2001 From: Grischa Zengel Date: Fri, 25 Sep 2015 19:28:03 +0200 Subject: [PATCH 5/6] Update zfs-import-cache.service.in --- etc/systemd/system/zfs-import-cache.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/systemd/system/zfs-import-cache.service.in b/etc/systemd/system/zfs-import-cache.service.in index 27870946fa1d..56631eafbb7c 100644 --- a/etc/systemd/system/zfs-import-cache.service.in +++ b/etc/systemd/system/zfs-import-cache.service.in @@ -12,3 +12,4 @@ Type=oneshot RemainAfterExit=yes ExecStartPre=/sbin/modprobe zfs ExecStart=@sbindir@/zpool import -c @sysconfdir@/zfs/zpool.cache -aN +ExecStop=@sbindir@/zpool export -a From 89316a9a32b555c7ab815a585a2dd01bd89769d1 Mon Sep 17 00:00:00 2001 From: Grischa Zengel Date: Fri, 25 Sep 2015 19:28:39 +0200 Subject: [PATCH 6/6] Update zfs-import-scan.service.in --- etc/systemd/system/zfs-import-scan.service.in | 1 + 1 file changed, 1 insertion(+) diff --git a/etc/systemd/system/zfs-import-scan.service.in b/etc/systemd/system/zfs-import-scan.service.in index bcf439ba17e6..53a243bc7bd8 100644 --- a/etc/systemd/system/zfs-import-scan.service.in +++ b/etc/systemd/system/zfs-import-scan.service.in @@ -12,3 +12,4 @@ Type=oneshot RemainAfterExit=yes ExecStartPre=/sbin/modprobe zfs ExecStart=@sbindir@/zpool import -d /dev/disk/by-id -aN +ExecStop=@sbindir@/zpool export -a