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 <dswartz@druber.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2883
This commit is contained in:
Dan Swartzendruber 2014-12-07 12:23:00 -05:00 committed by Brian Behlendorf
parent c944be5d7e
commit 1b95fd5d70
1 changed files with 1 additions and 0 deletions

View File

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