diff options
author | James Lee <[email protected]> | 2015-08-30 14:36:41 -0400 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2015-09-02 09:16:39 -0700 |
commit | 3f1cc17c9005d19faba91fe7236332ed502b1a3f (patch) | |
tree | 3499392a3fe8255ad8dbcb2c3673fbc7a372e312 /etc/init.d/zfs-zed.in | |
parent | fb40095f5f0853946f8150481ca22602d1334dfe (diff) |
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 <[email protected]>
Signed-off-by: Richard Yao <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #3513
Diffstat (limited to 'etc/init.d/zfs-zed.in')
-rwxr-xr-x | etc/init.d/zfs-zed.in | 19 |
1 files changed, 6 insertions, 13 deletions
diff --git a/etc/init.d/zfs-zed.in b/etc/init.d/zfs-zed.in index fa70a82c2..0f900b2be 100755 --- a/etc/init.d/zfs-zed.in +++ b/etc/init.d/zfs-zed.in @@ -2,29 +2,23 @@ # # zfs-zed # -# chkconfig: 2345 01 99 +# chkconfig: 2345 29 99 # description: This script will start and stop the ZFS Event Daemon. # probe: true # ### BEGIN INIT INFO # Provides: zfs-zed -# Required-Start: mtab -# Required-Stop: $local_fs mtab -# Default-Start: S +# Required-Start: zfs-mount +# Required-Stop: zfs-mount +# Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 -# X-Start-Before: checkfs -# X-Stop-After: zfs-import +# X-Stop-After: zfs-share # Short-Description: ZFS Event Daemon # Description: zed monitors ZFS events. When a zevent is posted, zed # will run any scripts that have been enabled for the # corresponding zevent class. ### END INIT INFO # -# NOTE: Not having '$local_fs' on Required-Start but only on Required-Stop -# is on purpose. If we have '$local_fs' in both (and X-Start-Before=checkfs) -# we get conflicts - zed and import needs to be started extremely early, -# but not stopped too late. -# # Released under the 2-clause BSD license. # # The original script that acted as a template for this script came from @@ -45,8 +39,7 @@ ZED_PIDFILE="@runstatedir@/$ZED_NAME.pid" do_depend() { - before zfs-import - after sysfs + after zfs-mount localmount } do_start() |