mirror_zfs/etc/systemd/system/zfs-share.service.in
Dan Swartzendruber 1b95fd5d70 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
2014-12-18 09:54:56 -08:00

15 lines
302 B
SYSTEMD

[Unit]
Description=ZFS file system shares
After=nfs-server.service
After=smb.service
After=zfs-mount.service
Requires=zfs-mount.service
PartOf=nfs-server.service
PartOf=smb.service
[Service]
Type=oneshot
RemainAfterExit=yes
ExecStartPre=-@bindir@/rm /etc/dfs/sharetab
ExecStart=@sbindir@/zfs share -a