Reorder zfs-* services to allow /var on separate dataset

ZED depends on /var.  When /var is a separate dataset, it must be
mounted before starting ZED.  This change moves the zfs-zed service
from starting first, to starting after zfs-mount, but before zfs-share.

As discussed in issue #3513, ZED does not need to start first in order
to consume events made during the zfs-import and zfs-mount services.
The events will be queued and can be handled later in the boot process.

ZED may, however, handle sharing in the future, so it should be started
before the zfs-share service.

This commit also stops the zfs-import service from writing temp files
to /var/tmp on shutdown and it corrects the return code for the OpenRC
service.

Other OpenRC-specific changes noted in issue #3513 were reitereated in
issue #3715 and committed in da619f3.

Signed-off-by: James Lee <jlee@thestaticvoid.com>
Signed-off-by: Richard Yao <ryao@gentoo.org>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #3513
This commit is contained in:
James Lee
2015-08-30 14:36:41 -04:00
committed by Brian Behlendorf
parent fb40095f5f
commit 3f1cc17c90
5 changed files with 45 additions and 46 deletions
+5 -5
View File
@@ -9,12 +9,12 @@
#
### BEGIN INIT INFO
# Provides: zfs-share
# Required-Start: $local_fs $network $remote_fs zfs-mount
# Required-Stop: $local_fs $network $remote_fs zfs-mount
# Required-Start: $local_fs $network $remote_fs zfs-mount zfs-zed
# Required-Stop: $local_fs $network $remote_fs zfs-mount zfs-zed
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Should-Start: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount
# Should-Stop: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount
# Should-Start: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
# Should-Stop: iscsi iscsitarget istgt scst @NFS_SRV@ samba samba4 zfs-mount zfs-zed
# Short-Description: Network share ZFS datasets and volumes.
# Description: Run the `zfs share -a` or `zfs unshare -a` commands
# for controlling iSCSI, NFS, or CIFS network shares.
@@ -34,7 +34,7 @@
do_depend()
{
after sysfs zfs-mount
after sysfs zfs-mount zfs-zed
keyword -lxc -openvz -prefix -vserver
}