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:
parent
c944be5d7e
commit
1b95fd5d70
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue