Changeset View
Changeset View
Standalone View
Standalone View
libexec/rc/rc.d/zfsbe
Show First 20 Lines • Show All 42 Lines • ▼ Show 20 Lines | while read _mp _name _canmount _mounted ; do | ||||
*) | *) | ||||
# filesystems with mountpoint elsewhere | # filesystems with mountpoint elsewhere | ||||
zfs mount $_name | zfs mount $_name | ||||
;; | ;; | ||||
esac | esac | ||||
done | done | ||||
} | } | ||||
activate_bootonce() | |||||
{ | |||||
local _dev | |||||
local _bootonce | |||||
local _be | |||||
_dev=$1 | |||||
_be=${_dev##*/} | |||||
_bootonce="`kenv -q zfs-bootonce`" | |||||
if [ "$_bootonce" = "zfs:${_dev}:" ] ; then | |||||
bectl activate $_be | |||||
fi | |||||
} | |||||
be_start() | be_start() | ||||
{ | { | ||||
if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then | if [ `$SYSCTL_N security.jail.jailed` -eq 1 ]; then | ||||
: | : | ||||
else | else | ||||
mount -p | while read _dev _mp _type _rest; do | mount -p | while read _dev _mp _type _rest; do | ||||
[ $_mp = "/" ] || continue | [ $_mp = "/" ] || continue | ||||
if [ $_type = "zfs" ] ; then | if [ $_type = "zfs" ] ; then | ||||
mount_subordinate $_dev | mount_subordinate $_dev | ||||
if checkyesno zfs_bootonce_activate; then | |||||
activate_bootonce $_dev | |||||
fi | |||||
fi | fi | ||||
break | break | ||||
done | done | ||||
fi | fi | ||||
} | } | ||||
be_stop() | be_stop() | ||||
{ | { | ||||
} | } | ||||
load_rc_config $name | load_rc_config $name | ||||
run_rc_command "$1" | run_rc_command "$1" |