]> granicus.if.org Git - zfs/commitdiff
Improve systemd script to not leave stale sharetab
authorDan Swartzendruber <dswartz@druber.com>
Sun, 7 Dec 2014 17:23:00 +0000 (12:23 -0500)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Thu, 18 Dec 2014 17:54:56 +0000 (09:54 -0800)
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 <dswartz@druber.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2883

etc/systemd/system/zfs-share.service.in

index d62e3407cc48dccb3793bd21b175437ce20d56d5..c27bbf903ecbe7afac20f5a8ca05200cbb7149e1 100644 (file)
@@ -10,4 +10,5 @@ PartOf=smb.service
 [Service]
 Type=oneshot
 RemainAfterExit=yes
+ExecStartPre=-@bindir@/rm /etc/dfs/sharetab
 ExecStart=@sbindir@/zfs share -a