View | Details | Raw Unified | Return to bug 237517 | Differences between
and this patch

Collapse All | Expand All

(-)zfs (-1 / +33 lines)
Lines 16-21 Link Here
16
stop_cmd="zfs_stop"
16
stop_cmd="zfs_stop"
17
required_modules="zfs"
17
required_modules="zfs"
18
18
19
# Add the following lines to /etc/rc.conf to enable ZFS ordered mount:
20
# zfs_ordered_mount_enable (bool):  Mount ZFS in order (or NO).
21
22
zfs_ordered_mount_enable=${zfs_ordered_mount_enable:-"NO"}
23
19
zfs_start_jail()
24
zfs_start_jail()
20
{
25
{
21
	if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
26
	if [ `$SYSCTL_N security.jail.mount_allowed` -eq 1 ]; then
Lines 25-35 Link Here
25
30
26
zfs_start_main()
31
zfs_start_main()
27
{
32
{
28
	zfs mount -va
33
	if checkyesno zfs_ordered_mount_enable; then
34
		local _zroot _zpool
35
36
		_zroot=`df -t zfs / | tail -1 | cut -d / -f 1`
37
38
		if [ -n "${_zroot}" ]; then
39
			zfs_mount_pool ${_zroot}
40
		fi
41
42
		for _zpool in `zpool list -Ho name`; do
43
			if [ "${_zpool}" != "${_zroot}" ]; then
44
				zfs_mount_pool ${_zpool}
45
			fi
46
		done
47
	else
48
		zfs mount -va
49
	fi
29
	zfs share -a
50
	zfs share -a
30
	if [ ! -r /etc/zfs/exports ]; then
51
	if [ ! -r /etc/zfs/exports ]; then
31
		touch /etc/zfs/exports
52
		touch /etc/zfs/exports
32
	fi
53
	fi
54
}
55
56
zfs_mount_pool()
57
{
58
	local _fs1 _fs2
59
60
	_fs1=`zfs list -Hro mountpoint,name -t filesystem ${1} | egrep -ve '^legacy|^none' | awk '{print $2}'`
61
62
	for _fs2 in `zfs list -Hro canmount,name -t filesystem ${_fs1} | egrep -ve ^off | awk '{print $2}'`; do
63
		zfs mount -v ${_fs2}
64
	done
33
}
65
}
34
66
35
zfs_start()
67
zfs_start()

Return to bug 237517