aboutsummaryrefslogtreecommitdiffstats
path: root/etc/systemd/system
diff options
context:
space:
mode:
authorDan Swartzendruber <[email protected]>2014-12-07 12:23:00 -0500
committerBrian Behlendorf <[email protected]>2014-12-18 09:54:56 -0800
commit1b95fd5d708bcf7de79740a0cd08de43caa0d847 (patch)
treee2bec8da8bb171dffe8464fe85e066b1c060c395 /etc/systemd/system
parentc944be5d7e619ad7259fdb5802f0f9bd90a22488 (diff)
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 <[email protected]> Signed-off-by: Brian Behlendorf <[email protected]> Closes #2883
Diffstat (limited to 'etc/systemd/system')
-rw-r--r--etc/systemd/system/zfs-share.service.in1
1 files changed, 1 insertions, 0 deletions
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