From 1b95fd5d708bcf7de79740a0cd08de43caa0d847 Mon Sep 17 00:00:00 2001 From: Dan Swartzendruber Date: Sun, 7 Dec 2014 12:23:00 -0500 Subject: [PATCH] Improve systemd script to not leave stale sharetab The systemd script zfs-share.service does 'zfs share -a' to share any required datasets. Unfortunately, /etc/dfs/sharetab is stale from the previous boot. Delete it before we share. Signed-off-by: Dan Swartzendruber Signed-off-by: Brian Behlendorf Closes #2883 --- 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 d62e3407c..c27bbf903 100644 --- a/etc/systemd/system/zfs-share.service.in +++ b/etc/systemd/system/zfs-share.service.in @@ -10,4 +10,5 @@ PartOf=smb.service [Service] Type=oneshot RemainAfterExit=yes +ExecStartPre=-@bindir@/rm /etc/dfs/sharetab ExecStart=@sbindir@/zfs share -a