Bug 202861 - Launch rc.d script zfs before script mountcritlocal.
Summary: Launch rc.d script zfs before script mountcritlocal.
Status: New
Alias: None
Product: Base System
Classification: Unclassified
Component: conf (show other bugs)
Version: 10.2-RELEASE
Hardware: Any Any
: --- Affects Some People
Assignee: freebsd-rc mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2015-09-02 20:07 UTC by fox
Modified: 2015-09-06 20:15 UTC (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description fox 2015-09-02 20:07:00 UTC
Hi,
I have faced the problem when automounting the file system.
Rc.d "/etc/rc.d/mountcritlocal" script starts earlier than the script rc.d "/etc/rc.d/zfs" which leads to inability to mount file system correctly. Script "/etc/rc.d/zfs" shoud be launched earlier  "/etc/rc.d/mountcritlocal". 

in script /etc/rc.d/mountcritlocal add zfs value.

....
# REQUIRE: root hostid_save mdconfig zfs
....
should be corrected.
Comment 1 Jilles Tjoelker freebsd_committer 2015-09-02 21:46:45 UTC
I don't know whether this is a good idea or not, but if you want to do this you have to remove REQUIRE: mountcritlocal from etc/rc.d/zfs to avoid a dependency cycle.
Comment 2 Dmitriy Bartkus 2015-09-03 07:31:29 UTC
Default configs:
less /etc/rc.d/zfs
#!/bin/sh
#
# $FreeBSD: releng/10.1/etc/rc.d/zfs 253076 2013-07-09 08:59:39Z avg $
#

# PROVIDE: zfs
# REQUIRE: mountcritlocal

less /etc/rc.d/mountcritlocal
#!/bin/sh
#
# $FreeBSD: releng/10.1/etc/rc.d/mountcritlocal 215824 2010-11-25 18:20:28Z dougb $
#

# PROVIDE: mountcritlocal
# REQUIRE: root hostid_save mdconfig
# KEYWORD: nojail shutdown

I dont see problem cycles.
Comment 3 Jilles Tjoelker freebsd_committer 2015-09-06 20:15:20 UTC
(In reply to Dmitriy Bartkus from comment #2)

There is no such cycle in head, but adding zfs to mountcritlocal's REQUIRE (as proposed here) will create a cycle.